Hello,
i try this
this.listeners["changeValue"] =
this.widgets["datum"].addListener("changeValue", function(e) {
this.loadTimelist();
},this);
this.listeners["SHOPID"] =
this.widgets["SHOPID"].addListener("changeSelection", function(e) {
this.loadTimelist();
},this);
and later this
if(this.listeners["datum_changeValue"]) {
this.widgets["datum"].removeListenerById(this.listeners["datum_changeValue"]);
}
if(this.listeners["SHOPID_changeSelection"]) {
this.widgets["SHOPID"].removeListenerById(this.listeners["SHOPID_changeSelection"]);
}
this.listeners = [];
but the events not destroyed
> http://demo.qooxdoo.org/1.6.x/apiviewer/#qx.core.MEvents~addListener
>
> Look at "Returns:"
>
> Cheers,
> Fritz
>
> On Thu, 23 Feb 2012, [email protected] wrote:
>
>> hello,
>>
>> what ist the id of the listener?
>>
>>> Hi,
>>>
>>> the function you add as listener is not the function you give when removing
>>> the listener. In fact, you pass an anonymous function to addListener.
>>>
>>> Try:
>>>
>>> this.widgets["datum"].addListener("changeValue", this.loadShopData, this);
>>> this.widgets["datum"].removeListener("changeValue", this.loadShopData,
>>> this);
>>>
>>> Another approach is to remember the id of the listener and use
>>> removeListenerById().
>>>
>>> Regards
>>> Tristan
>>>
>>> Am 23.02.2012 um 12:34 schrieb [email protected]:
>>>
>>>> Hello,
>>>>
>>>> i add some listeners like this
>>>>
>>>> this.widgets["datum"].addListener("changeValue",
>>>> function(e) {
>>>> this.loadShopData();
>>>> },this);
>>>>
>>>> this.widgets["SHOPID"].addListener("changeSelection",
>>>> function(e) {
>>>> this.loadUserData(this.USERID);
>>>> },this);
>>>>
>>>> this.widgets["USERID"].addListener("changeSelection",
>>>> function(e) {
>>>> this.loadTimelist();
>>>> },this);
>>>>
>>>>
>>>> nad when i laod new data, i want to deactivate/remove it.
>>>>
>>>> i do this
>>>>
>>>> this.widgets["datum"].removeListener("change",this.loadTimelist,this);
>>>> this.widgets["SHOPID"].removeListener("change",this.loadUserData,this);
>>>> this.widgets["USERID"].removeListener("change",this.loadTimelist,this);
>>>>
>>>> or this
>>>>
>>>> this.widgets["datum"].removeListener("changeValue",this.loadTimelist,this);
>>>> this.widgets["SHOPID"].removeListener("changeSelection",this.loadUserData,this);
>>>>
>>>> this.widgets["USERID"].removeListener("changeSelection",this.loadTimelist,this);
>>>>
>>>>
>>>>
>>>> but the listeners always active, what ist wrong?
>>>>
>>>>
>>>> ------------------------------------------------------------------------------
>>>> Virtualization& Cloud Management Using Capacity Planning
>>>> Cloud computing makes use of virtualization - but cloud computing
>>>> also focuses on allowing computing to be delivered as a service.
>>>> http://www.accelacomm.com/jaw/sfnl/114/51521223/
>>>> _______________________________________________
>>>> qooxdoo-devel mailing list
>>>> [email protected]
>>>> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
>>> ------------------------------------------------------------------------------
>>> Virtualization& Cloud Management Using Capacity Planning
>>> Cloud computing makes use of virtualization - but cloud computing
>>> also focuses on allowing computing to be delivered as a service.
>>> http://www.accelacomm.com/jaw/sfnl/114/51521223/
>>> _______________________________________________
>>> qooxdoo-devel mailing list
>>> [email protected]
>>> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
>>
>> ------------------------------------------------------------------------------
>> Virtualization& Cloud Management Using Capacity Planning
>> Cloud computing makes use of virtualization - but cloud computing
>> also focuses on allowing computing to be delivered as a service.
>> http://www.accelacomm.com/jaw/sfnl/114/51521223/
>> _______________________________________________
>> qooxdoo-devel mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
>>
>>
------------------------------------------------------------------------------
Virtualization & Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel