Signal/slot with classes derived from TObject

Is it possible to pass a class derived from TObject via Emit () using the signal/slot mechanism?

What I tried was: Emit(“AddT3(T3Notify*)”,t3);
with class T3Notify : public TObject { … };
T3Notify has a streamer (ClassDef, ClassImp), and comes through a TSocket (which has of course nothing to do with my question).

My code compiles and runs without problems, BUT the value of the pointer that I receive in the slots is always just 1 !

If I look into the TQObject source code, I can’t see any support for passing objects via Emit ().

Am I overstreching the capabilities of signal/slot or is there a way I can get this working.

Ralf Ulrich

Hi Ralf,

You need to cast the pointer t3 as Long_t when sending a signal, i.e.
Emit(“AddT3(T3Notify*)”,(Long_t)t3);
I will check the documentation and will include this important information if it is not there.

Cheers, Ilka

I read in several places about signal/slot mechanisms. What is it? Is there a description of what it is and what it does?

Thanks!
Ken

Signal/slots mechanism is described at page 346 in the Users Guide

Rene