Hi Michael,
> Hi,
>
> I am writing a compiled program using ROOT.
> I have the following problem:
>
> I need to be able to receive a standard signal
> such as "SIGUSR" as defined in signal.h, from
> another application and respond to it.
>
> Now, the function that handles the signal in the
> ROOT program needs to be a static class member
> (as far as I can tell that's the only way it works
> using signal.h).
>
> I have made the function a static member of my
> program's main frame (TGMainFrame class).
>
> However, I can not call any of the other member
> functions (which I need to be able to do) because,
> well..., the static member function doesn't have
> access to those.
>
> My questions are:
>
> 1) Did you guys build in a nicer way to handle
> messages from other applications?
ROOT provides TSocket and TMapFile classes for IPC.
Do you need it to be platform independent?
Do you need signaling once? How fast?
>
> 2) If not, is there a way to get access to the
> mainframe object from a static member function
> the mainframe class?
Use "global pointer" to an object of mainframe class, e.g.
void myStaticFunction()
{
gMyMainFrame->MapWindow();
}
HTH. Regards. Valeriy
This archive was generated by hypermail 2b29 : Sun Jan 02 2005 - 05:50:05 MET