I've got a question about a system error I get when using editor widgets on V9, CHui interface...
Here's an example:
define work-table w_table
field w_fill1 as character
field w_fill2 as character
field w_edit3 as character view-as editor size 30 by 2.
def var count as int.
do count = 1 to 5:
create w_table.
assign
w_fill1 = subst("record &1, fill-in 1", count)
w_fill2 = subst("record &1, fill-in 2", count)
w_edit3 = subst("record &1, editor", count).
end.
form
w_fill1 format "x(20)"
w_fill2 format "x(20)"
w_edit3 view-as editor size 30 by 2
with 5 down frame f_down.
do while true with frame f_down on error undo, retry on endkey undo, retry:
if retry then do:
up frame-line - 1.
end.
for each w_table with frame f_down:
display w_table.
down.
end.
readkey.
if keyfunction(lastkey) = "new-line" then do:
/* Goto line #3 to insert a record there */
up frame-line - 1.
down 2.
/* Visualize an empty record */
scroll from-current down.
prompt-for w_table.
create w_table.
assign w_table.
end.
end.
Run the code, then press F9 (or NEW-LINE) and then press F4 (or END-ERROR) to cancel the prompt-for.
Then do this same thing once more, and you'll get the system error #49 (Memory Violation)
Can anybody please explain to me why this occurs. Needless to say I'm looking for a way to prevent te system error from occuring...
Please help me out...
Dirky
Here's an example:
define work-table w_table
field w_fill1 as character
field w_fill2 as character
field w_edit3 as character view-as editor size 30 by 2.
def var count as int.
do count = 1 to 5:
create w_table.
assign
w_fill1 = subst("record &1, fill-in 1", count)
w_fill2 = subst("record &1, fill-in 2", count)
w_edit3 = subst("record &1, editor", count).
end.
form
w_fill1 format "x(20)"
w_fill2 format "x(20)"
w_edit3 view-as editor size 30 by 2
with 5 down frame f_down.
do while true with frame f_down on error undo, retry on endkey undo, retry:
if retry then do:
up frame-line - 1.
end.
for each w_table with frame f_down:
display w_table.
down.
end.
readkey.
if keyfunction(lastkey) = "new-line" then do:
/* Goto line #3 to insert a record there */
up frame-line - 1.
down 2.
/* Visualize an empty record */
scroll from-current down.
prompt-for w_table.
create w_table.
assign w_table.
end.
end.
Run the code, then press F9 (or NEW-LINE) and then press F4 (or END-ERROR) to cancel the prompt-for.
Then do this same thing once more, and you'll get the system error #49 (Memory Violation)
Can anybody please explain to me why this occurs. Needless to say I'm looking for a way to prevent te system error from occuring...
Please help me out...
Dirky