Hi,
I am trying to write a small editor program that shows the current line and
column in a QTk textbox.
Everytime there is a 'text modified' event, i call this procedure:
proc {SetRC}
{TextBox index(insert CursorPos)}
Row:=CursorPos.1
Col:=CursorPos.2
{RowText set({Value.toVirtualString @Row 1000 1000})}
{ColText set({Value.toVirtualString @Col 1000 1000})}
end
Row and Col are global cells.
RowText and ColText are handles to two separate text boxes.
I expected this to update the text to the current column and row each time the
user moves the cursor.
However, it works for the first keypress then i if i keep pressing return i
get:
%***************************** failure **************************
%**
%** Tell: 3 = 2
%**
%** Call Stack:
%** procedure 'ToCoord' in
file
"/home/guillomovitch/rpm/BUILD/mozart-1.3.2.20060615-std/wp/qtk/QTkText.oz",
line 73, column 3, PC = 136869800
%** procedure 'QTkText,index' in
file
"/home/guillomovitch/rpm/BUILD/mozart-1.3.2.20060615-std/wp/qtk/QTkText.oz",
line 297, column 6, PC = 136875684
%** procedure 'SetRC' in file "/home/mark/marks.oz", line 33, column 0, PC =
139088856
%** procedure 'QTkAction,execute' in
file
"/home/guillomovitch/rpm/BUILD/mozart-1.3.2.20060615-std/wp/qtk/QTkDevel.oz",
line 1290, column 6, PC = 138886172
%** procedure 'Listen' in
file "/home/guillomovitch/rpm/BUILD/mozart-1.3.2.20060615-std/wp/qtk/QTk.oz",
line 223, column 8, PC = 137152036
%**--------------------------------------------------------------
The first digit after Tell increments each time i press return but the text
boxes don't update.
I can vaguely see what oz is trying to tell me but i can't understand why.
Any help would be gratefully received.
Regards
Mark Richardson
_________________________________________________________________________________
mozart-users mailing list
[email protected]
http://www.mozart-oz.org/mailman/listinfo/mozart-users