in my "main gui" I have a button that creates an object containing a
separate application in a separate frame.
In this kind of circumstance you need to be rather precise with your
language. If this is all part of one process, then there is only one
application. There is one wx.App object, and one main loop. You can
certainly have multiple top-level windows hanging off of a single
application, and I'm guessing that what you really have.
The application, natively, uses messages to comunicate among its classes.
If I click just once, there is no problem.
If I click twice (or more) I get another windows that basically are
"mirrors" of the first one (as far as I understand they share
messages, variables and so on).
Of course I don't want something like that, I want to have separate
instances of that class.
It depends. When you click again, do you create a new instance of the
other window? If so, then that window has its own class object and its
own variables, and it only processes messages that are aimed for that
window.
When you say "messages", what do you mean? Have you implemented your
own messaging architecture? If you are doing a simple
publish/subscribe, where all subscribers see all messages that are
published, then you might have the problem you describe. But if you are
using wxPython messaging, then each message has a "target", and they
won't get confused.
If you have done your own messaging system, and you don't have the
concept of a "target" for the message, then you may need to add that.
···
robert.pelson1@gmail.com wrote:
--
Tim Roberts, timr@probo.com
Providenza & Boekelheide, Inc.