Starting up with Seaside, problem with component being rendered twice

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Starting up with Seaside, problem with component being rendered twice

Gilles Schtickzelle
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
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside

seaside_session2.jpg (59K) Download Attachment
seaside_session1.jpg (52K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Starting up with Seaside, problem with component being rendered twice

Lukas Renggli
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 <[hidden email]> 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
> [hidden email]
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>
>



--
Lukas Renggli
www.lukas-renggli.ch
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Starting up with Seaside, problem with component being rendered twice

Gilles Schtickzelle
Hi Lukas,

Here's the file out.

Gilles

On Thu, Oct 7, 2010 at 8:40 PM, Lukas Renggli <[hidden email]> 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 <[hidden email]> 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
> [hidden email]
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>
>



--
Lukas Renggli
www.lukas-renggli.ch
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside


_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside

STTutTodoApp.st (32K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Starting up with Seaside, problem with component being rendered twice

Lukas Renggli
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 <[hidden email]> wrote:

> Hi Lukas,
>
> Here's the file out.
>
> Gilles
>
> On Thu, Oct 7, 2010 at 8:40 PM, Lukas Renggli <[hidden email]> 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 <[hidden email]> 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
>> > [hidden email]
>> > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>> >
>> >
>>
>>
>>
>> --
>> Lukas Renggli
>> www.lukas-renggli.ch
>> _______________________________________________
>> seaside mailing list
>> [hidden email]
>> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>
>
> _______________________________________________
> seaside mailing list
> [hidden email]
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>
>



--
Lukas Renggli
www.lukas-renggli.ch
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Starting up with Seaside, problem with component being rendered twice

Tobias Pape
Am 2010-10-07 um 21:54 schrieb Lukas Renggli:

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

Incidentally, that's the way the method is implemented in
the Tutorial.

So Long,
        -Tobias
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside