[Seaside] updating children components

Romain Robbes rrobbes at info.unicaen.fr
Tue Jun 1 08:51:32 CEST 2004


Hi Avi,

Thanks for your answer. Is the requirement for #children to return the 
same
value applicable only across each call to #render in WARenderLoop ?
If so, I might as a temporary hack add a first traversal to tell my 
components
to <<freeze>> during rendering.

Romain

On May 28, 2004, at 11:05 PM, Avi Bryant wrote:

>
> On May 28, 2004, at 1:25 AM, Romain Robbes wrote:
>
>> In fact we have trees of domain objects that can be seen by several 
>> users at the
>> same time, and we want to manage udpating using an observer pattern, 
>> as the
>> tree's shape can change (and therefore the component tree too). So we 
>> want the
>> children to change only after each rendering pass.
>
> That's an interesting problem.  I'm not sure exactly how to best 
> address it.  I would definitely recommend using a pull model rather 
> than push - your #children method should build its results dynamically 
> from the current state of the domain objects, rather than the domain 
> objects directly modifying the component tree, since if you don't have 
> any synchronization around that you could definitely get into trouble. 
>  But even so, you're right that there are no hard guarantees that 
> #children will return the same collection over multiple calls, and in 
> some cases this could lead to odd behavior.
>
> In practice, I suspect you won't see many problems of this sort, but 
> of course when you do they'll be especially annoying because they'll 
> be intermittent and hard to reproduce.
>
> I'll think about how to make this more robust - ie, how to best cache 
> the value of #children across periods of time where it's supposed to 
> stay the same.
>
> Thanks for bringing this up.
>
> Avi
>
> _______________________________________________
> Seaside mailing list
> Seaside at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/listinfo/seaside
>



More information about the Seaside mailing list