Cameron,

I've never seen that code, but I was thinking about the same a few days 
ago. I decided against it for two reasons:

    * config properties won't appear in jsdoc
    * postprocessing would be less intuitive (like converting properties
      to number, boolean etc.)


Regards,
Andreas.

Cameron Shorter wrote:
> 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?
>


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