Hi fellow Steve,
How about having a hidden FileHistorySharer that uses pubsub to the other
processes.
Gadget/Steve
Because each process' pubsub has no knowledge of the others. The main
reason I decided to launch new windows as new processes is because the
only other way would be to make each pubsub call aware of which Frame
it belongs to, which kills off the whole purpose of using pubsub ---
to decouple my objects.
Hi,
1) Go back to using a single process with multiple windows there are
many ways to work around all of them receiving messages.
* In the message handler call back you can use 'frame.GetActive()' to
check if its the currently active window and if its not just return
without doing anything in your handler.
* Send an identifier with your message data so that when your callback
method is invoked you can check it to see if it should be ignored or
not.
2) If you want to stay with multiple processes then using sockets for
IPC will be your best cross platform choice.
How about having a hidden FileHistorySharer that uses pubsub to the other
processes.
Pubsub does not work between processes, to make it work you would
still need some form of IPC.
But some of my Model data objects call pub.sendMessage. They would
have to provide a reference to the frame that they "belong" to, which
they have no knowledge of. I did discuss this issue (multiple Frames
all receiving the same published messages) with PubSub's creator,
Oliver, but Google Groups is sending me in an infinite redirect loop
when trying to access pubsub's homepage.
Or, it means changing *every* listener function to check whether its
frame is the active Frame. My main Frame contains a couple of custom
panels (some of which has its own custom panels) -- it might get
rather nested to test for the active frame in each of these methods.
Looks like there's no simple way
I'll take a look at sockets, never really done much low-level coding.
···
On 18 June 2010 12:58, <GadgetSteve@live.co.uk> wrote:
On 18 June 2010 13:23, Cody Precord <codyprecord@gmail.com> wrote:
On Fri, Jun 18, 2010 at 6:58 AM, <GadgetSteve@live.co.uk> wrote: