1

does anybody have a working example for a wxperl-program which starts a second wxperl-program $cmd and sends events to it?
I start $cmd using something like

$frame = Wx::Frame->new(undef,-1,'MyName',wxDefaultPosition);
$procID = Wx::NewId();
$proc = Wx::Process->new($frame,$procID);
$pid = Wx::ExecuteCommand($cmd,wxEXEC_ASYNC,$proc));
Wx::Event::EVT_END_PROCESS($frame, $procID, \&reap_child);

The last code-line is how my program gets informed about termination of the child-process. This direction of event-triggering is ok - now I'm looking for the other way round:
I'd like to send events from parent to the newly created process: at least "Close", "De-Iconize" and "Focus". How can one do that?

ztirom
  • 4,382
  • 3
  • 28
  • 39
leu
  • 2,051
  • 2
  • 12
  • 25

1 Answers1

1

You can use wxIPC classes for inter-process communications if they're wrapped by wxPerl. You definitely cannot use wx events for this as they work inside a single process only.

VZ.
  • 21,740
  • 3
  • 39
  • 42
  • thanks for your hint. My hope was that events will do the job, but this was a vain hope, obviously – leu Jan 03 '14 at 20:26