Actions
Bug #1157
closedJSignal does not trigger JSlot
Start date:
02/05/2012
Due date:
% Done:
0%
Estimated time:
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
Updated by Koen Deforche almost 13 years ago
- 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
Updated by Boris Nagaev almost 13 years ago
Hello!
I forgot to connect it in test example :)
The signal is now connected.
The slot is still not triggered.
Updated by Koen Deforche almost 13 years ago
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
Updated by Koen Deforche almost 13 years ago
- Status changed from Feedback to Resolved
Updated by Boris Nagaev almost 13 years ago
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.
Actions