Some time ago, I remember there being some code which I can't find now.
I think it was in Config.js, but might have been in WidgetBase.js and/or
ModelBase.js
It went something like:
foreach property for a widget or model in the config file {
this.configAttributes.`propertyName`=
node.selectSingleNode("mb:propertyName").firstChild.nodeValue;
}
The advantage is that in one small block of code, we initialized all
config.xml variables.
The downside is that we don't need to declare variables in JS, which
means the variables are not included in jsdocs. So we could do something
in between:
In each widget/model, declare all variables and assign default values to
them.
In WidgetBase/ModelBase assign all parameters in the config file if the
variable has already been defined in the Widget/Model. (I haven't
checked to see if this is achievable yet)
Is this worth considering?
--
Cameron Shorter
Geospatial Systems Architect
Tel: +61 (0)2 8570 5050
Mob: +61 (0)419 142 254
Think Globally, Fix Locally
Commercial Support for Geospatial Open Source Solutions
http://www.lisasoft.com/LISAsoft/SupportedProducts.html
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
mapbuilder-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mapbuilder-devel