Hi Eric, 

I am a Java guy and I am not used to manage my scope manually...
I had to use the bind function in other places to keep my scope

Thanks, it is working now...

Jose

-----Original Message-----
From: Eric Lemoine [mailto:[email protected]] 
Sent: January 23, 2011 8:39 AM
To: Lopes, Jose (AAFC-AAC)
Cc: [email protected]
Subject: Re: [OpenLayers-Users] Using OpenLayers.Function.bind


On Fri, Jan 21, 2011 at 9:38 PM, Lopes, Jose (AAFC-AAC)
<[email protected]> wrote:
> Hi,
>
> I am trying to use OpenLayers.Function.bind in this code:
>
>
> var featureStyleConfig
> = MyApp.Style.convertFeatureAttributesToSymbology(layer.features[0]);
>
> var wndSymbologySelector =
> MyApp.Ext.SymbologySelector.getInstance(OpenLayers.Function.bind(this.styleCallback,
> this), featureStyleConfig);
>
> wndSymbologySelector.show();
>
> But I get the following error when trying to use the styleCallback function
> (actually, it is never called):
>
>  func is undefined  (in BaseTypes.js (line 414))
>        return func.apply(object, newArgs);
>
> It seems that the function is null when the callback is being done.
>
> Are there any restrictions on the use of OpenLayers.Function.bind ?
> (like classes where it can be used...;-)

Nope. Are you sure this.styleCallback is actually defined when
Function.bind is called?



-- 
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

Reply via email to