Bug #1157
closed
JSignal does not trigger JSlot
Added by Boris Nagaev about 13 years ago.
Updated about 13 years ago.
Description
Hello!
I created JSignal and JSlot, and connected them.
JSignal is emitted by setTimeout.
But JSlot seems not to be triggered (no alert message).
See attachment
Files
- Status changed from New to Feedback
- Assignee set to Koen Deforche
- Target version set to 3.2.1
Hey,
It seems you didn't connect the signal to the slot ?
Regards,
koen
Hello!
I forgot to connect it in test example :)
The signal is now connected.
The slot is still not triggered.
Hey,
The order is important though: signal.createCall() will create a string that includes the relevant JavaScript code, including that of slots connected.
So you need to swap the two statements, like this:
signal.connect(slot);
doJavaScript("setTimeout(function() { " +
signal.createCall() + "}, 3000);");
Regards,
koen
- Status changed from Feedback to Resolved
Hello!
Thank you!
Could you clarify this in the documentation of JSignal::connect(JSlot) and JSignal::connect(string of function) and probably of EventSignal, please ?
BR.
- Status changed from Resolved to Closed
Also available in: Atom
PDF