No so clear haha. Has every kind of event "undefined" order? or only when
connecting to "javascript" signals? For example, if I connect two or more
slots to the "closeEditor" signal of an ItemDelegate, is that order also
undefined? Because the "closeEditor" signal doesn't depend directly on
javascript events, rather, its triggered "manually" by the ItemDelegate
class, and in that case, in my understanding, the order is the one defined
by the boost::signals2 library (which is the order of connections).
2016-02-25 19:10 GMT+01:00 Aarón Bueno Villares <abv15...@gmail.com>:
> Thank you, pretty clear.
>
> 2016-02-25 10:41 GMT+01:00 Koen Deforche <k...@emweb.be>:
>
>> 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
>>
>>
>
------------------------------------------------------------------------------
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785471&iu=/4140
_______________________________________________
witty-interest mailing list
witty-interest@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/witty-interest