Hey Sven, 2010/4/23 Sven Knoblich <[email protected]>: > Hello, > im trying to create my own EventSignal. Here is my code which is in my own > WContainerWidget. > > //initialize > EventSignal<>* myEvent = voidEventsignal( "TEST",true); > > myEvent->connect( SLOT( this, MyClass::VoidMethod)); > > > //call > EventSignal<>* myEvent = voidEventsignal( "TEST",false); > > myEvent->senderRepaint(); > > > Now, the flag within the event for update is set. But when i execute the > code, the method VoidMethod was not called. > > Am i right with this event mechanism?
I believe not quite. EventSignal is used only from within the library to connect events to built-in HTML JavaScript events (like onmousedown). To use signals in your own classes, you should use the documented Signal<> class. You can connect() slots to the signal and emit() the signal, passing parameters from the emit to each of the slots. See also http://www.webtoolkit.eu/wt/doc/reference/html/classWt_1_1Signal.html Regards, koen ------------------------------------------------------------------------------ _______________________________________________ witty-interest mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/witty-interest
