[OpenLayers-Users] How to stop registering events
Max Stephan
x.zam at gmx.net
Thu Oct 29 10:17:01 EDT 2009
Hi Eric,
thanks for your help but I don't get the idea what your code is doing. Could
you explain it? Furthermore what is the unregister function in general
exactly doing. Am I right in thinking it stops the previous defined
registering of an event or is it doing something else?
greets
Max Stephan
Eric Lemoine-2-2 wrote:
>
>
> Hi
>
> it should work. I just did the following in the FireBug console:
>
>>>> var cb = function() {}; scope = {};
>>>> var e = new OpenLayers.Events({}, null, ["eventtype"]);
>>>> e.register("eventtype", scope, cb);
>>>> e.listeners["eventtype"].length == 1
>>>> e.unregister("eventtype", scope, cb);
>>>> e.listeners["eventtype"].length == 0
>
> Cheers,
>
> --
> Eric Lemoine
>
--
View this message in context: http://n2.nabble.com/How-to-stop-registering-events-tp3911670p3912751.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.
More information about the Users
mailing list