Well, you don't have to do that, there's a work around...

ResourceLoaderFileModule objects can have more than one script per 
module, just pass in an array for the scripts element. In this array you 
will first have the OpenLayers script, and then the another script you 
have written. Your script will just export some symbols like this...

window.myObject = myObject;
window.myMethod = myMethod;

Can that work?

- Trevor

On 11/8/10 3:36 PM, Jeroen De Dauw wrote:
> Hey,
>
>> You are probably assuming your code is running in the global scope.
>>> After looking at this with Firebug, I guess it's a scope issue, as each
> module's contents is getting put in a function.
>
>> If you want to create a global variable or function you need to do so by
> adding it to the window object.
> So in my use case this would mean editing the OpenLayers library?
>
> Cheers
>
> --
> Jeroen De Dauw
> * http://blog.bn2vs.com
> * http://wiki.bn2vs.com
> Don't panic. Don't be evil. 50 72 6F 67 72 61 6D 6D 69 6E 67 20 34 20 6C 69
> 66 65!
> --
> _______________________________________________
> Wikitech-l mailing list
> [email protected]
> https://lists.wikimedia.org/mailman/listinfo/wikitech-l

_______________________________________________
Wikitech-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikitech-l

Reply via email to