I think there should be a check and a kind of handling (removal?) of
duplicates in the widgets argument of
(defgeneric (setf widget-children) (widgets obj &optional type).
Currently there is not any such check and so someone could do:
(let ((dup (make-dup-widget)))
(make-instance 'composite
:widgets (list dup dup)))
Since the above is accepted as it is , the first page load renders 2 widgets
with same id, but any subsequent ajax request always renders the first one
because firstly, mark-dirty does this:
...
(unless (widget-dirty-p w)
(push w *dirty-widgets*)
...
and widget-dirty-p will see the same object,
and secondly even if somehow we pushed dup twice into *dirty-widgets* there
would be problem in the ajax response content handling by JS.
Unless I am missing something, this should be resolved but i am not sure
about plain removal of the duplicate. Any suggestions?
Could there be a legit use case of one widget being rendered twice in
different html places? And even if there is I am not sure if it could be
implemented by same widget rendered twice (in html space).
Any suggestions?
--
You received this message because you are subscribed to the Google Groups
"weblocks" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/weblocks?hl=en.