Re: Revisiting the persisting of attributes on thecombo_box widget

Alex Russell <[email protected]> Thu, 11 Sep 2003 10:59:49 -0500
Newsgroups gmane.comp.windows.devel.netwindows
Organization netWindows.org
Message-ID <[email protected]>
On Thursday 11 September 2003 00:01, Mark Anderson wrote:
> How about we just put a srcNode member in any widget instance,
> which is its constructor node?

because it is replaced (removed). We could cloneNode() it and store that 
instead althought I don't know what kind of a "hit" we're going to take in 
terms of memory usage. No way to tell until we try, I guess.

> If you just want to deal with the attributes in the original inline
> constructor (including ones that are not html attributes),
> then you can then do
>     var val = my_widget.srcNode.getAttribute('some_att');
> or
>     var atts = my_widget.srcNode.attributes;
>     val = atts['some_att'].nodeValue;
>
> That is if your goal is just implement your own semantics, independent
> of NW and independent of html.

This almost seems more elegant. If we clone the node without a deep copy, this 
might be preferred, now that I think about it.

> The idea behind inline_copy_atts was to copy html attributes over
> from srcNode to domNode. You are correct that in some widgets it
> is probably not going to do the right thing, since it may
> be some descendent of domNode that should really be getting it.
> I don't have any great suggestions about that, which are generic.

Nor do I = (

-- 
Alex Russell
[email protected]    BD10 7AFC 87F6 63F9 1691 83FA 9884 3A15 AFC9 61B7
[email protected]  F687 1964 1EF6 453E 9BD0 5148 A15D 1D43 AB92 9A46

_______________________________________________
The netWindows developers list: [email protected]
http://netwindows.org/mailman/listinfo/devel_netwindows.org