On Sun, Nov 6, 2011 at 3:35 PM, Edward K. Ream <[email protected]> wrote:
> On Nov 6, 2:20 pm, Kent Tenney <[email protected]> wrote:
>
>> My expectation was for one call per each unselecting of a node. If it's
>> possible to provide that behaviour, it would simplify writing code
>> hooked to the event: as it is, I expect I'll come to the point of needing
>> to keep track of which of the several calls I'm currently in.
>
> Rev 4746 might be what you want.
>
> The selectHelper method is the only method that generates select1/2/3
> and unselect1/2 events.
>
> The new code generates these events only if the newly-requested
> position is not the same as the previous position.
>
> By-hand tests indicate that this works as expected.  I have no idea
> how to do a unit test for this.
>
> All unit tests pass with the new code, which is a non-trivial
> statement, imo.
>
> *Important*: changing tabs or shifting focus from body to headline (or
> anywhere else) has nothing to do with selecting a node: selection
> means something precise, namely that leoTree.select is called, which
> then calls selectHelper.

I guess I understand. My simple minded assumption was that
_unselecting_ would be synonymous with losing focus, whereas
unselecting only happens when another node is selected.

>
> Let me know how this works for you.  To test the code, I recommend
> setting trace = True; verbose = False in selectHelper.
>
> Edward
>
> --
> 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.
>
>

-- 
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.

Reply via email to