Hi list,

is it true that all element variables are considered to be of type string? Wouldn't it be nice if we could have some different types of element vars (at least for javascript variables )?

IMHO this would require an additional database column and an update of the existing vars. As for backwards compatibility the default type could be 'string', I guess.

I'd suggest haveing at least these types:

* string * integer * float * array * object
   * boolean

consider boolean setting for modules, they should be interpretebable as booleans, or consider having more variable that are variants of equal properties (tabs module). I found my self fuddling with stuff like this:

element_var = "opt1,opt2,foo,bar,baz";
element_var_as_array = element_var.split(',');
another_var_which_represents_a_boolean = 'true';
another_var_as_boolean = ( another_var_which_represents_a_boolean.toLowerCase() == 'true' ) ? true : false;

This is in my opinion error prone, time consuming (performance) and not elegant. Or am I missing something in the concept of element vars?

What do you think?


_______________________________________________
Mapbender_dev mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/mapbender_dev

Reply via email to