On Fri, 16 Sep 2011 15:51:21 -0500
Kent Tenney <[email protected]> wrote:

> OK, no problem. My only interest in it is for testing purposes, I can easily
> close and re-open Leo to clear out the hook.


The critical thing with hooks is to check that the 'c' the hook was
called for is the 'c' your hook is bound to, assuming it's bound to a c.

    def loadLinks(self, tag, keywords):
        """load links after file opened"""
        if self.c != keywords['c']:
            return  # not our problem
    
        self.loadLinksInt()

is a typical pattern.

Of course not all hooks are bound to a particular c.

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.

Reply via email to