[Laszlo-dev] setters and LzDataElement

André Bargull a.bargull at intensis.de
Mon Mar 10 16:46:45 PDT 2008


The LzDataElementTrait-mixin (sic) is also used by LzDataset, which has 
all the super-duper extensible setter mechanism of LzNode. So you'd also 
need to define the setters there.
But do we really want to have "setAttribute" for LzDataElement & co? 
Because there is also "setAttr" to set the actual xml-node attributes, 
so that's quite a bit ambiguous when to use "setAttribute" resp. "setAttr".

> As an optimization, I think we should not try to give LzDataElement
> the extensible setter mechanism that LzNode has.
>
> There are a couple of setters defined in LzDataElement, which would look like
>
> attributes = "setAttrs";
> childNodes = "setChildNodes";
> nodeName = "setNodeName";
> and maybe
> ownerDocument = "setOwnerDocument";
>
> and LzDataText has a setter for
> data = "setData";
>
> I can't think of any case where the user would want to add setters to
> these classes, so I am thinking of just hardcoding these
> into a static class var setters list, or possibly even hardcoding them
> into a custom setAttribute method on LzDataElement.
>
> All the other crud (earlySetters, DelayedSetters, getters, options,
> defaultattrs), are not needed for LzDataElement I think.
>
> Classes like LzDatapointer which derive from LzNode will still get all
> that stuff. I'm just talking about LzDataElement and other LzMiniNode
> subclasses.
>
> Thoughts?
>
>
> -- 
> Henry Minsky
> Software Architect
> hminsky at laszlosystems.com <http://www.openlaszlo.org/mailman/listinfo/laszlo-dev>



More information about the Laszlo-dev mailing list