So, I went to the source, "maybe I can figure this out".
Found in leoAtFile.py
g.doHook('after-auto', p = p)
Ah, the c=c was left out, I'm thinking.
However, I was unable to get keywords.get('c') to work.
I did a fair amount of chasing the sequence involved in registering
an event handler, finally gave up, not much smarter except in the
knowledge that the process is not simple.
Thanks,
Kent
On Wed, Sep 28, 2011 at 4:47 PM, Kent Tenney <[email protected]> wrote:
> This UNL
> Users Guide-->Intermediate Topics-->Scripting Leo with Python-->
> @file scripting.txt-->@rst html\scripting.html-->Event handlers-->
> @rst-no-head Summary of event handlers
>
> Says of event handler after-auto
>
> Event name (tag argument) Stop? When called
> Keys in keywords dict
> ============================= ======== =================================
> 'after-auto' after each @auto file loaded
> c,p (note 13)
>
> But I'm finding 'c' to be missing from keywords dict
>
> In my plugin code:
>
> ======================================
> def auto(tag, keywords):
> g.es("c: %s" % keywords.get('c'))
> g.es("c: %s" % keywords)
>
> g.registerHandler('after-auto', auto)
> ======================================
>
>
> The log pane shows a value for p, but c is None
>
> c: None
> keywords: {'p': <pos 173266668 childIndex: 0 ... leotools.py>}
>
> What am I missing?
>
> Thanks,
> Kent
>
--
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.