trichview.com

trichview.support




double clicking in tables leads to errors


Return to index


Author

Message

Daniel Zimmerman

Posted: 10/20/2004 23:03:20


Hi Sergey, I'm running into a problem with a set of interactions, and

not sure how to deal with it.


To set up the problem, we have a class which is a descendent of

RichViewEdit (TMyRVE), and another class which is a descendent of

LabelItem (TMyLabel).  We have mapped the RveDblClick event to a method,

MyRVDblClick.


In this scenario, the user has inserted a TMyLabel into a cell in a

table. When they double-click on the label, first the label gets

selected (this is not something done in our code), and then, from inside

MyRVDblCLick, we put up a dialog box.


When that dialog box exits, everything appears to be ok.  However, if

you then click on the cell border in the table, there is an error:

ERVTableInPlaceError, 'Cannot destroy cell inplace editor at this time'.   

This is thrown from procedure TRVTableItemInfo.SaveInplace - which is

triggered by the mouse down event.  [This error does not happen when you

simply highlight the TMYLabel and then click on the cell border]


To try to work around it, i added code in in the MyRvDblClick method to

call deselect before exiting.  Now, when i try the same scenario, that

error is gone, but i get a different error one: double-clicking on the

cell boundary causes a list index out of bounds in

RVTableItemInfo.GetCells.


So, my questions are:

1) why does the TMyLabel get automatically selected

2) What is the best way around this problem?


Thanks,

Daniel





Powered by ABC Amber Outlook Express Converter