Project

General

Profile

Actions

Bug #1157

closed
BN KD

JSignal does not trigger JSlot

Bug #1157: JSignal does not trigger JSlot

Added by Boris Nagaev almost 15 years ago. Updated over 14 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Target version:
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

jslot.cpp (685 Bytes) jslot.cpp Boris Nagaev, 02/05/2012 10:05 PM
jslot.cpp (715 Bytes) jslot.cpp Boris Nagaev, 02/06/2012 02:21 PM

KD Updated by Koen Deforche almost 15 years ago Actions #1

  • 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

BN Updated by Boris Nagaev almost 15 years ago Actions #2

Hello!

I forgot to connect it in test example :)
The signal is now connected.
The slot is still not triggered.

KD Updated by Koen Deforche over 14 years ago Actions #3

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

KD Updated by Koen Deforche over 14 years ago Actions #4

  • Status changed from Feedback to Resolved

BN Updated by Boris Nagaev over 14 years ago Actions #5

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.

KD Updated by Koen Deforche over 14 years ago Actions #6

  • Status changed from Resolved to Closed

Fixed in 3.2.1

Actions

Also available in: PDF Atom