matthiasm wrote:
> Several things come to mind: we cannot do many assumptions about event  
> variableas except during the handling of the event during handle() or  
> a callback. This means that Fl::event_text() at FL_PASTE is only valid  
> during FL_PASTE. There is no guarantee that it will have any meaning  
> after returning from FL_PASTE (which implies that Fl::event_text()  
> must be saved at FL_PASTE time if it needs to be used again later).
> 
> Similarly, we can not assume that and Idle or Timeout after an  
> FL_PASTE will still have Fl::event() set to anything meaningful. All  
> Fl::event*() variable are meaningless outside of handle() or callbacks.

        Right; in the recent version I posted, I save a copy of
        Fl::event_text() and Fl::event_length() when FL_PASTE happens.
        So that should be getting handled OK.

        I think the problem Ian is talking about is a different one;
        how the event to handle() is being saved by the app in 'evt',
        and how subsequent events are overwriting that value, messing
        up the logic in the timer callback triggered code that checks
        that 'evt' value.

        So Ian's highlighting a different issue here, not really
        related to the Fl::event*() calls.

        I'm not sure, but I'm thinking the snapshotting of "evt"
        in the app can maybe be removed, since the callback() should
        only be invoked in this case due to an FL_PASTE.

        If it's not unique to FL_PASTE, then maybe a separate callback
        should be setup, specific to DND.
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk

Reply via email to