[Seaside] multiple components
watchlala at hotmail.com
Sat Feb 4 20:44:36 UTC 2012
I don't have a good answer but I generally use announcements in that situation.
Date: Sat, 4 Feb 2012 18:12:34 +0100
From: milan.mimica at gmail.com
To: seaside at lists.squeakfoundation.org
Subject: [Seaside] multiple components
Some of my more complex views contain a hierarchy of components, each component taking care of some small part of UI logic. This view is implemented as a container component which delegates rendering to several sub-components. From outside, this view looks like an ordinary WAComponent. Everything goo so far. A small problem arises when such component tries to #call: another component. Since technically it is usually the inner component sending #call: to self, the new view doesn't replace the whole hierarchy, but only the inner component that actually sent #call:, which is not fine in this case.
What am I doing now, is sending each inner component a reference to its container component and then the inner object sends #call: to its container instead of self. I find it ugly, need to elaborate why? Is there a better solution?
A similar problem arises with #answer -- you cannot #answer from an inner component because it wasn't the one which wall #call-ed in the first place. Again I need a reference to a container component to #answer from there.
seaside mailing list
seaside at lists.squeakfoundation.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the seaside