On Tue, 26 Jul 2011 13:24:25 -0500 Terry Brown <[email protected]> wrote:
> 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: Hmm, now I'm wondering if I'm confusing two different issues. The doubleclick edit mode issue this email describes is a problem, which I spent some time trying to deal with. But SegundoBob also wanted to use single_click_auto_edits_headline = True but that blocks double-click events, or did, before I added the timer to only fire single clicks which aren't part of a double click (the *only* way to do that is wait for the second click). So, I think the timer addresses this second issue, and I forget exactly what happened with the first. For the second, I'd propose making you're TIME_HACK mod. a @setting, if it isn't, the code may as well be deleted. Cheers -Terry > 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.
