[Seaside] Menu building pattern?

C. David Shaffer cdshaffer at acm.org
Wed Aug 4 20:07:17 CEST 2004

Avi Bryant wrote:

> On Aug 4, 2004, at 10:34 AM, C. David Shaffer wrote:
>> Every time I build the menu item list I get a fresh list of 
>> SCMenuItem instances.
> If you create new instances for every response, they shouldn't be 
> components, and they shouldn't be included in #children.  Just have 
> your menu items descend from Object, have them implement #renderOn: 
> instead of #renderContentOn:, and it should work fine.  They won't 
> respond to #call: or #addDecoration: or anything like that, but I'm 
> guessing you're not using those anyway.

OK, I obviously went down the wrong road by making them components.  It 
works perfectly now.

> Once more, for emphasis: if it doesn't stick around between requests, 
> it's *not* a WAComponent.

Thanks :-)  I think I'll remember now :-) :-)  It's kind of like when I 
tell my kids "don't stick your finger in there" but they seem to have to 
do it anyway.  Pain is an effective conditioner.


More information about the Seaside mailing list