Hi guys,
i have a problem with XbaeMatrix and i can't find a
clue to solve it, maybe you can help me.
I have a matrix which is a kind of hex editor - the
user is allowed to enter 2 hexadecimal chars per cell.
So i have written my eventhandler OnLeaveCell which
checks if the string is hexadecimal, converts the
characters to uppercase, and sets doit to False if the
user has entered invalid stuff.
So far everything works, but what i wanted to do now
is that when the user entered his data the matrix
automatically switches to the next cell, so that the
user can go on typing without pressing TAB. Here is
the code of OnLeaveCell:
// checks if text is hexadecimal...
// convert to upper case...
// get the current row/column:
int row, col;
XbaeMatrixGetCurrentCell(w, &row, &col);
// edit the next cell:
row+=1;
XbaeMatrixEditCell(w, row, col);
The problem is that obviously XbaeMatrixEditCell calls
the OnLeaveCell-handler, and therefore i get a
recursion, and a core dump.
What can i do to prevent that?
Thanks,
Chris
=====
http://www.crupp.de - about me (English)
http://www.kochenmachtspass.de - Kochrezepte en masse (Deutsch)
__________________________________________________
Do You Yahoo!?
Get email at your own domain with Yahoo! Mail.
http://personal.mail.yahoo.com/