Hi,

Currently, every widget, tool and model script picks its config 
properties by using something like

var propertyNode = widgetNode.selectSingleNode("mb:myProperty");
this.property = propertyNode ? propertyNode.firstChild.nodeValue() : 
"default";

Not only that firstChild.nodeValue does not work in Opera (this is the 
reason why there is now the getNodeValue in Util.js, which is not being 
used very frequently), but it produces quite a huge amount of code 
duplication.

This issue is now addressed in http://jira.codehaus.org/browse/MAP-500, 
targeted for 1.5rc2.

What I already did:
in r3866: introduced new functions Mapbuilder.getProperty() and 
Mapbuilder.parseBoolean(). MapPaneOL already makes use of those.

Instead of the above, we can now say

this.property = Mapbuilder.getProperty(widgetNode, "mb:property", 
"default");

TODO: use it in all widgets, tools and models. Volunteers are welcome!

Regards,
Andreas.


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

Reply via email to