[wxPython-users] two application objects, conflicting window names

Robin Dunn robin at alldunn.com
Tue Aug 8 09:34:16 PDT 2006


Christian Kristukat wrote:
> Hi,
> I'm trying to implement the very common behaviour of an application which clones
> itself upon opening a new, let's say project. So I created a new app obkect an
> run it main loop. 

You can only have one wx.App object per process.  Creating more than one 
concurrently or sequentially may or may not work in various situations 
or on various platforms, but it is not supported at all.

> This works, however there seem to be window name clashes
> between the two instances. The gui is created from xrc and I defined quite some
> xml window ids. Is there a way to avoid the name conflicts and still use xml
> window ids?

No, the name to ID mapping is held in a global list, so it will be 
shared by all instances.  This will result in the same ID being used for 
the same name.  What exactly are the problems you are having with this?

-- 
Robin Dunn
Software Craftsman
http://wxPython.org  Java give you jitters?  Relax with wxPython!





More information about the wxpython-users mailing list