Project

General

Profile

Actions

Bug #1157

closed

JSignal does not trigger JSlot

Added by Boris Nagaev about 12 years ago. Updated about 12 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
Actions #1

Updated by Koen Deforche about 12 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

Actions #2

Updated by Boris Nagaev about 12 years ago

Hello!

I forgot to connect it in test example :)

The signal is now connected.

The slot is still not triggered.

Actions #3

Updated by Koen Deforche about 12 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

Actions #4

Updated by Koen Deforche about 12 years ago

  • Status changed from Feedback to Resolved
Actions #5

Updated by Boris Nagaev about 12 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 #6

Updated by Koen Deforche about 12 years ago

  • Status changed from Resolved to Closed

Fixed in 3.2.1

Actions

Also available in: Atom PDF