From: David P. <dav...@pi...> - 2009-11-30 11:06:53
|
Hi I trying to understand the event model used in gwt-openlayers As far as I understand it, there are two event models. The one based on openlayers register event, etc. The the model employed in gwt-openlayers, eg addMapClickListener from Map.java. They are both based on the same code model, but I have an issue with the openlayers one. I have written a wrapper for the OpenLayers.Protocol.HTTP function. Its it provides several callback interfaces. In my wrapped version I support both the use of the callback paramter and an addProtocol style function. As I expected when ever I accessed a file the callback function for the success event fired. BUT my callback function installed by the gwt-openlayers function fired whenever a file protocol event fired, ie when ever openlayer opens a file my protocol specfic callback function was called, instead of only being called when my protocol wrapper was active. It seems that anycallback function installed by an openlayers Listener function are global,ie not tied to a specfic instance off an object. Is this the expect results or should objects only get events that they created? The only reason thatI ask is that I want to wrap some of the Handler(Hover,Box, MouseWheel, etc) objects which have an extensive system off callbacks functions and I want to get the right interface. Dave -- Any views expressed in this message are those of the individual sender, except where the sender specifically states them to be the views of the Pinan Software |