[Seaside] WAComponent callbacks, continuations and #children

John Thornborrow john at pinesoft.co.uk
Thu Jun 7 09:39:17 UTC 2007

Michael Roberts wrote:
> On 6 Jun 2007, at 15:21, John Thornborrow wrote:
>> Hello all,
>> I am currently getting my self into a bit of a mess with regards to
>> managing the components of my application. I am finding that the
>> application enters a circular reference when I have two components,
>> that reference each other in #children.
> I guess I don't really understand.  Do you have some code?
> do you mean that you have something of the form:
> Component1>>children
>     children := OrderedCollection new.
>     children add: myLocalComponent.
>     children addAll: self component2 children
>     ^children
> and then something reversed in Component2>>children?
> Mike
> _______________________________________________
> Seaside mailing list
> Seaside at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
No, much simpler than that..

    ^Array with: self menuComponent with: self contentComponent

    ^Array with: Stage2 instance

    ^Array with: Stage1 instance

When #childrenDo: loop starts, it will perform a never ending loop.
However, if I don't include the above referencing, the user receives an
error "Component not registered for callback"
My #renderContentOn: method for the two Stage components contains:

html anchor callback: [root content: StageX instance]; with: 'click here'

Other issue (1. on the list) is the maintenance of the instances, I'm
not happy with using singletons as this could (and probably will)
generate cross-session changes.


Pinesoft Computers are registered in England, Registered number: 2914825. Registered office: 266-268 High Street, Waltham Cross, Herts, EN8 7EA

This message has been scanned for viruses by BlackSpider MailControl - www.blackspider.com

More information about the Seaside mailing list