[Seaside] Starting up with Seaside, problem with component being rendered twice

Lukas Renggli renggli at gmail.com
Thu Oct 7 19:54:12 UTC 2010


The problematic part has actually nothing to do with Seaside:

StLoginComponent>>messageComponent
	^ messageComponent ifNil: [self messageComponent: StMessageComponent new ]

If messageComponent is nil, messageComponent is initialized but self
is answered by #messageComponent:

The following code works:

StLoginComponent>>messageComponent
	^ messageComponent ifNil: [ messageComponent := StMessageComponent new ]

Better not use lazy-initialization unless really required.

Lukas


On 7 October 2010 21:37, Gilles Schtickzelle <gschtick at gmail.com> wrote:
> Hi Lukas,
>
> Here's the file out.
>
> Gilles
>
> On Thu, Oct 7, 2010 at 8:40 PM, Lukas Renggli <renggli at gmail.com> wrote:
>>
>> Hi Gilles,
>>
>> Hard to tell without seeing the source code. Can you provide it?
>>
>> The difference between Seaside 2.8 and 3.0 shouldn't matter for most
>> tutorials.
>>
>> Lukas
>>
>> On 7 October 2010 20:30, Gilles Schtickzelle <gschtick at gmail.com> wrote:
>> > Hello,
>> >
>> > I was doing the old seaside tutorial from the Software Architecture
>> > Group (Hasso-Platter-Institut) and I basically my components are
>> > rendered
>> > twice at the beginning, apparently before a session is attached to the
>> > user
>> > if I understand correctly. It's hard to explain for a newbie like me so
>> > have
>> > a look at the screenshots attached.
>> >
>> > Any idea why it's doing that? I've been following the tutorial to the
>> > point
>> > but it's a couple years old and I am using seaside 3.0 so maybe
>> > something
>> > changed in root application setup? I tried debugging but right now with
>> > all
>> > the components being called left and right it goes way over my head.
>> >
>> > Thanks,
>> > Gilles
>> >
>> > _______________________________________________
>> > seaside mailing list
>> > seaside at lists.squeakfoundation.org
>> > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>> >
>> >
>>
>>
>>
>> --
>> Lukas Renggli
>> www.lukas-renggli.ch
>> _______________________________________________
>> seaside mailing list
>> seaside at lists.squeakfoundation.org
>> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>
>
> _______________________________________________
> seaside mailing list
> seaside at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>
>



-- 
Lukas Renggli
www.lukas-renggli.ch


More information about the seaside mailing list