On Tue, 26 Jul 2011 12:42:23 -0500 "Edward K. Ream" <[email protected]> wrote:
> On Sun, Jul 10, 2011 at 6:38 PM, Terry Brown <[email protected]> wrote: > > Just a heads up that I've fiddled with the doubleclick handling code on > > the trunk, please let me know asap if anything seems odd. > > I would much rather not have timers going off in event handlers. > What's wrong with having both single-click and double-click event > handlers firing? The single-click code seems like it should not be > objectionable: it simply selects the node. If, later, we get a double > click, what harm has been done? The problem isn't single/double, but double click not stopping the event processing. It has the correct form: if g.doHook('doubleClick1') is None: do-normal-double-click-stuff g.doHook('doubleClick2') but I think some other route through the code, or additional processing of the event means that even thought the handler registered on doubleClick1 returns non-None, the node goes into headline edit mode, with focus. This is bad, because the doubleClick1 on an @url node attempts to select and raise a different commander (tab), so now you're looking at one commander but focus is in another, so what you type trashes the headline in the original commander. The timer shouldn't be needed - a 'doubleClick1' hook which returns non-None should stop the headline going into edit mode. If you can make that be the case, all is well. Cheers -Terry -- You received this message because you are subscribed to the Google Groups "leo-editor" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/leo-editor?hl=en.
