Hey Aaron,

2016-02-25 1:17 GMT+01:00 Aarón Bueno Villares <abv15...@gmail.com>:

> I have a WFileUpload widget whose uploaded() signal is connected to two
> different functions, one creating a database object, and another one
> showing information about the newly created db object.
>
> It's obvious that the first function must be invoke before the second one,
> so, I connected both functions to the signal in that order. But it seems
> that the functions are being called in inverse order of connection (which
> contradicts the behaviour of boost::signals2 as far as I know), and that
> caused me some headeaches and segmentation faults.
>

> So, the question is: in which order are the connected functions invoked
> when calling `emit()`? In the reverse order of connection, or that depends
> on the context or on some Javascript logic?
>

The order is undefined and you shouldn't rely on it. In the above scenario,
you should try to reorganize your code so that the second function is not
connected to the WFileUpload uplodaed() widget, but to a signal emitted in
response to creating a new database object.

Koen
------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140
_______________________________________________
witty-interest mailing list
witty-interest@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/witty-interest

Reply via email to