Hi,
For this kind of problem, simply you can use nesting level counters
addEventListener("myEvent", function(ev) {
if (!arguments.callee.counter++) {
doEventProcessing();
}
arguments.callee.counter--;
});
Does something similar to this solve your problem?
Stéphane BERTHELOT wrote:
>
> Hi again everyone,
>
> I have another problem for you today ;)
> In our code we usually use lots of event listeners but sometimes actions
> we do in the event listener itself triggers the same event listener
> (because the code is somewhat complex and calls some qooxdoo functions
> that trigger the same event)
>
> I would like to know if creation of a method is planned in Target or
> anywhere else that could temporarily disable a kind of event listener
> ("changeSelected" for example).
> This way we could have something like "Critical Sections" where we can
> fire events that wouldn't be handled (at least immediately, it would be
> nice of course that they'll be handled when leaving the "Critical
> Section" or even better that this behavior would be configurable).
>
> It could look like disableEventListeners(eventname, keepeventsqueue) and
> enableEventListeners(eventname).
>
> If this is not something that would be done relatively quickly please
> tell me so I'll play with Target._listeners variable myself for our needs.
>
> Thanks and best regards,
> Stéphane.
>
> --
> Stéphane BERTHELOT
> Hybrid Perception
> - Réseau : Sécurité et Serveurs , Développements spécifiques, Formations
> logiciels libres -
> 38-40 rue Emile Bertin, 54000 NANCY, France
> http://www.hybridperception.com
> Tel/Fax. 03 83 27 21 61
> Portable 06 70 23 97 60
> Rédacteur sur le Blog Numérique Lorrain <http://www.le-bnl.info>
>
>
> -------------------------------------------------------------------------
> Using Tomcat but need to do more? Need to support web services, security?
> Get stuff done quickly with pre-integrated technology to make your job
> easier
> Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
> _______________________________________________
> qooxdoo-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
>
>
--
View this message in context:
http://www.nabble.com/Need-a-method-to-stop-event-listeners-for-%27Critical-Sections%27-tf2159219.html#a5977669
Sent from the qooxdoo-devel forum at Nabble.com.
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel