On Tue, Sep 5, 2017 at 12:01 PM, Terry Brown <[email protected]> wrote:


> so
>
> @g.command('blah')
> def blah(event):
>     c = event.get('c')
>     qs = getattr(c, '_quicksearch')
>
> or something similar works.  That patterns very common in plugins.
>
> So at least for quicksearch, "fixing" c.k.registerCommand by
> deprecating it in favor of g.command() seems feasible.
>

​I should have thought of that!​

>
> Not sure why g.command() doesn't have the "late binding" problem


​Heh.  Neither am I.  @g.command calls k.registerCommand, but without any
shortcut.  The decorator also sets global_commands_dict, which presumably
happens early enough so that bindings "take".

Edward

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.

Reply via email to