ILWidget >> #show: issue

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

ILWidget >> #show: issue

Bernat Romagosa
Hi list,

Maybe I missunderstood how #show: should behave, but isn't it supposed to delegate control to the widget specified to the argument until this one answers? Sort of like what #call: does in seaside.

I ask because I have the following code:

contents
^ [ :h | 
self show: something.
h build: whatever ]

But the widget seems to not delegate control to "something", as "whatever" is also built. Is this the expected behaviour?

Thanks!

--
Bernat Romagosa.
Reply | Threaded
Open this post in threaded view
|

Re: ILWidget >> #show: issue

Nicolas Petton
On Fri, 2012-03-09 at 12:04 +0100, Bernat Romagosa wrote:

> Hi list,
>
>
> Maybe I missunderstood how #show: should behave, but isn't it supposed
> to delegate control to the widget specified to the argument until this
> one answers? Sort of like what #call: does in seaside.
>
>
> I ask because I have the following code:
>
>
> contents
> ^ [ :h |
> self show: something.
> h build: whatever ]


Hi!

#show: is useless here, as you are already building the receiver when
calling it.

If you want to try #show: you should call it in action methods. If you
only want to test some stuff, you can do it on #initialize

initialize
        super initialize.
        self show: something


Cheers,
Nico

>
> But the widget seems to not delegate control to "something", as
> "whatever" is also built. Is this the expected behaviour?
>
>
> Thanks!
>
>
> --
> Bernat Romagosa.
>


Reply | Threaded
Open this post in threaded view
|

Re: ILWidget >> #show: issue

Bernat Romagosa
Okay I see, so indeed I had misunderstood ;)

Thanks!

2012/3/9 Nicolas Petton <[hidden email]>
On Fri, 2012-03-09 at 12:04 +0100, Bernat Romagosa wrote:
> Hi list,
>
>
> Maybe I missunderstood how #show: should behave, but isn't it supposed
> to delegate control to the widget specified to the argument until this
> one answers? Sort of like what #call: does in seaside.
>
>
> I ask because I have the following code:
>
>
> contents
> ^ [ :h |
> self show: something.
> h build: whatever ]


Hi!

#show: is useless here, as you are already building the receiver when
calling it.

If you want to try #show: you should call it in action methods. If you
only want to test some stuff, you can do it on #initialize

initialize
       super initialize.
       self show: something


Cheers,
Nico

>
> But the widget seems to not delegate control to "something", as
> "whatever" is also built. Is this the expected behaviour?
>
>
> Thanks!
>
>
> --
> Bernat Romagosa.
>





--
Bernat Romagosa.