Am 13.06.2012 20:21, schrieb asilver:
> My question is with editendcommand. I�m using this option for editing
> a cell with a checkbox in it. If the user changes/toggles the
> checkbutton box, I would like to immediately save the contents of the
> tablelist file as soon as the user moves the cursor out of that cell.
> I wanted to do this with the call to the editendcommand. The problem
> is the editendcommand does not write the changed value of the checkbox
> to the contents of the tablelist until the procedure is finished. Is
> there a recommended simple way to do this? I guess I could add
> another button in the window to �save to file� but I didn�t really
> want to do that. Any suggestions for tips would be appreciated.
>
> Thank you.
>
> Al Silverstein
It is true that the internal value of the cell being edited won't be
updated before the editing is finished. This is the intended and
documented behavior. From this it follows that saving the tablelist
widget's contents *directly* from within the editendcommand is not the
right solution. On the other hand, you can use the editendcommand to
*schedule* your save script for delayed execution via "after idle" or
"after 1", or even "after 0". By the time the save script is invoked,
the editing session is already finished, and thus the tablelist's
internal content is up-to-date.
--
Csaba Nemethi
http://www.nemethi.de mailto:
csaba....@t-online.de