On Fri, 7 Nov 2003 15:19:12 +0100 (Romance Standard Time) Vadim Zeitlin <[EMAIL PROTECTED]> wrote:
> On Fri, 7 Nov 2003 15:09:36 +0100 (CET) Robert Vazan <[EMAIL PROTECTED]> wrote: > > RV> EVT_TEXT comes *after* the control is modified. It then returns true from > RV> IsModified, which triggers the assert. Minimal editor currently traps > RV> EVT_KEY_DOWN that comes before modifying control, but it doesn't always > RV> correspond to perceived operation of changing text. > > Sorry, I still don't see the problem. What is the exact scenario? I > thought the problem was with OnFirstTimeFocus() being called too late, > isn't it so? Currently the assert happens as follows. User (Mark) uses middle mouse button to paste some text. The control sets modified flag, but no events are executed. He clicks at first row and first column. Still no events. Then he presses enter. This executes EVT_KEY_DOWN, which is forwarded to OnFirstTimeModify. OnFirstTimeModify discovers that IsModified is true and asserts. An alternative, that I have probably tried before, is to trap EVT_TEXT. This breaks as follows. User presses 'x' in unmodified control. Some key event handler inserts 'x' and marks control as IsModified. Then it executes EVT_TEXT, which is forwarded to OnFirstTimeModify. OnFirstTimeModify discovers that IsModified is true and we are home again. Anyway, this is bad UI (where does input go to after expanding template?) and it won't get support from toolkit. ------------------------------------------------------- This SF.net email is sponsored by: SF.net Giveback Program. Does SourceForge.net help you be more productive? Does it help you create better code? SHARE THE LOVE, and help us help YOU! Click Here: http://sourceforge.net/donate/ _______________________________________________ Mahogany-Developers mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/mahogany-developers
