Hi Edward

There is a problem with the onClick model for plugins, as described in
the Templates section of the leoPlugins.

The onCreate  method gets called every time *any* new commander is
created therefore the plugin controllers get recreated for *every*
commander *every* time a new commander is created.

Mostly this does not matter but it is certainly undesirable, and I
think it may account for effects I have previously wrongly attributed
to the commander not being killed.  I only happened to notice because
I am working on a plugin where it does matter.

In rclick.py I have dealt with the 'problem' like this:

try:
   c.theContextMenuController
except:
   c.theContextMenuController = ContextMenuController

Although it's not a serious problem, several plugins live with the
effect without apparent difficulty, I thought you and other plugin
writers/maintainers ought to be made aware of it.

I would like to alter the template in leoSettings to warn about this
problem and present a possible solution, or perhaps you would prefer
to do this yourself?

Bob
--~--~---------~--~----~------------~-------~--~----~
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