Suppose you have a complicated-wodget you can simply say
(let ((a (make-instance 'complicated)
(b (make-instance 'complicated)))
(make-instance 'composite
:widgets (list a b)))
And they end up w differing dom ids. It's a great way to reuse
functionality and a killer feature of weblock's widget oriented
approach imho.
Sent from my iPad
> --
> You received this message because you are subscribed to the Google Groups "weblocks" group.
> To post to this group, send email to webl...@googlegroups.com.
> To unsubscribe from this group, send email to weblocks+u...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/weblocks?hl=en.
I wonder how you would end up putting a duplicate object into a children
list; never fell into that pit. But I guess it might be different for
other people, and I'm very much in favor for checking things to prevent
people from shooting themselves in the foot all too easily.
Comments and questions:
* composite is deprecated, just use (make-instance 'widget :children (...))
* what do you mean by "in composite definition"?
* not taking your answer to the above into account: it should probably
go into (setf widget-children)
Hope that helps. :) Thanks for your interest in Weblocks!
Leslie
It seems to be, but there are some issues you'll have to take care
of. In this case we somehow need to ensure that DOM ids are unique,
and be careful to sync the state of the other copies when one of
them is updated (marked dirty).
So I guess it could be done, but it will need a couple of hours to make
it work correctly (and not break anything else).
Leslie