Spec: Dynamically replacing widgets

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

Spec: Dynamically replacing widgets

Sean P. DeNigris
Administrator
I'm building a wizard, so I want the page widget to be replaced by the next one when the user clicks "Next". I tried (in the container model, in the callback for the next button):
        pageModel := PageModel owner: self.
        self needRebuild: false.
        self buildWithSpec.

It "worked" in that it replaced the page, but it looked really weird... the vertical spacing of the controls was off and all the text widgets were invisible, even though they were there and working if clicked on.

Before:


After:
Cheers,
Sean
Reply | Threaded
Open this post in threaded view
|

Re: Spec: Dynamically replacing widgets

Benjamin Van Ryseghem (Pharo)
it's weird indeed.

Is the code available somewhere ?

Ben

On Oct 21, 2012, at 6:36 PM, Sean P. DeNigris wrote:

> I'm building a wizard, so I want the page widget to be replaced by the next
> one when the user clicks "Next". I tried (in the container model, in the
> callback for the next button):
> pageModel := PageModel owner: self.
> self needRebuild: false.
> self buildWithSpec.
>
> It "worked" in that it replaced the page, but it looked really weird... the
> vertical spacing of the controls was off and all the text widgets were
> invisible, even though they were there and working if clicked on.
>
> Before:
> <http://forum.world.st/file/n4652378/Screen_Shot_2012-10-21_at_12.32.02_PM.png>
>
> After:
> <http://forum.world.st/file/n4652378/Screen_Shot_2012-10-21_at_12.32.14_PM.png>
>
>
>
> --
> View this message in context: http://forum.world.st/Spec-Dynamically-replacing-widgets-tp4652378.html
> Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
>


Reply | Threaded
Open this post in threaded view
|

Re: Spec: Dynamically replacing widgets

Stéphane Ducasse
In reply to this post by Sean P. DeNigris
sean

did you have a look at Merlin?
Because a spec version of Merlin would be cool

Stef
On Oct 21, 2012, at 6:36 PM, Sean P. DeNigris wrote:

> I'm building a wizard, so I want the page widget to be replaced by the next
> one when the user clicks "Next". I tried (in the container model, in the
> callback for the next button):
> pageModel := PageModel owner: self.
> self needRebuild: false.
> self buildWithSpec.
>
> It "worked" in that it replaced the page, but it looked really weird... the
> vertical spacing of the controls was off and all the text widgets were
> invisible, even though they were there and working if clicked on.
>
> Before:
> <http://forum.world.st/file/n4652378/Screen_Shot_2012-10-21_at_12.32.02_PM.png>
>
> After:
> <http://forum.world.st/file/n4652378/Screen_Shot_2012-10-21_at_12.32.14_PM.png>
>
>
>
> --
> View this message in context: http://forum.world.st/Spec-Dynamically-replacing-widgets-tp4652378.html
> Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
>


Reply | Threaded
Open this post in threaded view
|

Re: Spec: Dynamically replacing widgets

Sean P. DeNigris
Administrator
Stéphane Ducasse wrote
did you have a look at Merlin?
Just read about it from the list...

Stéphane Ducasse wrote
Because a spec version of Merlin would be cool
Yes, definitely!
Cheers,
Sean
Reply | Threaded
Open this post in threaded view
|

Re: Spec: Dynamically replacing widgets

Stéphane Ducasse

On Oct 21, 2012, at 7:12 PM, Sean P. DeNigris wrote:

> Stéphane Ducasse wrote
>> did you have a look at Merlin?
>
> Just read about it from the list…

Merlin is a little framework developed by Cyrille Delaunay in the context of Moose
and Merlin is about wizard :)

Stef

>
>
> Stéphane Ducasse wrote
>> Because a spec version of Merlin would be cool
>
> Yes, definitely!
>
>
>
> --
> View this message in context: http://forum.world.st/Spec-Dynamically-replacing-widgets-tp4652378p4652382.html
> Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
>