Python plug-in framework

Tom, are you getting any errors when you press a button in the
plugin panel?

Could it be that self.logWindow is defined in the MainFrame
class, but you are referencing it from within the PluginPanel
class? If you need plugin-to-mainframe communication, which
you will, there are about 3 options you can do, the simplest
of which is probably using .GetParent() from within PluginPanel
to get a reference to the main frame, but the pubsub module
allows for more proper independence of objects.

If this doesn’t work, if you could post a small runnable app,
somebody can help you get it going.

Che

Figured it out…
I was adding my plugin-panel to a sizer which was owned by another panel.
Apparently you cannot do that without the mentioned side-effect.
Adding the plugin-panel directly to the sizer of the mainFrame solved the problem.

Best regards,
Tom.

You can do that, but you need to set the parent of the plugin panel to
be the panel that owns the sizer, not the frame.

Regards,

Nate

···

On Tue, Apr 28, 2009 at 17:57, Tom Clerckx <tclerckx@gmail.com> wrote:

Figured it out...
I was adding my plugin-panel to a sizer which was owned by another panel.
Apparently you cannot do that without the mentioned side-effect.
Adding the plugin-panel directly to the sizer of the mainFrame solved the
problem.