On Wed, Jul 27, 2011 at 1:02 AM, Dave Potts <[email protected]> wrote: > Hi list > > I am trying to work out what type off information is supplied to the > success/fail callback functions of the saveSrategy. > > Looking in the source code at line 229 of Save.js in openlayers 2.10 > suggests that a response(i.e.OpenLayers.Protocol.Response) style argument > should be expected. > > But looking at the data supplied for the save callback function gives the > following types. > > > "response" value="[object Object]" > "object" value="[object Object]" > "element" value="null" > "type" value="success" > > Which does not look like a OpenLayers.Protocol.Response object, any > suggestions as to what is going on here?
The Events.triggerEvent function adds "object", "element", and "type" properties to the event object provided by the caller. To get the Response instance in callback functions use evt.response, where evt is the first (and only) argument of your callback. Hope this clarifies things. -- Eric Lemoine Camptocamp France SAS Savoie Technolac, BP 352 73377 Le Bourget du Lac, Cedex Tel : 00 33 4 79 44 44 96 Mail : [email protected] http://www.camptocamp.com _______________________________________________ Users mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/openlayers-users
