Reset Spec #openWorldWithSpec:

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

Reset Spec #openWorldWithSpec:

Ben Coman

Message #openWorldWithSpec: sets a Spec entity to take up the whole
World.  How can that be reverted? ...to set the World back to the state
delivered with a virgin Pharo image?

cheers -ben

Reply | Threaded
Open this post in threaded view
|

Re: Reset Spec #openWorldWithSpec:

Benjamin Van Ryseghem (Pharo)
euuuuh

Basically what is done when you open a spec as world is that the background color changed,
all the morph are closed, and the spec is specified to take all the space.

So to revert it, I think you *only* need to close the spec morph, 
set the background color to white, and voilĂ 

Ben

On 24 Oct 2013, at 18:51, [hidden email] wrote:


Message #openWorldWithSpec: sets a Spec entity to take up the whole World.  How can that be reverted? ...to set the World back to the state delivered with a virgin Pharo image?

cheers -ben


Reply | Threaded
Open this post in threaded view
|

Re: Reset Spec #openWorldWithSpec:

Ben Coman
Benjamin wrote:
euuuuh

Basically what is done when you open a spec as world is that the background color changed,
all the morph are closed, and the spec is specified to take all the space.

So to revert it, I think you *only* need to close the spec morph, 
set the background color to white, and voilà

Ben
  

Okay.  So this works okay...

TabsExample new openWithSpec.
[    (Delay forSeconds: 3) wait.
    SpecWindow allInstancesDo: [  :windowModel | windowModel delete ].
] fork.

but this does not....

TabsExample new openWorldWithSpec.
[    (Delay forSeconds: 3) wait.
    SpecWindow allInstancesDo: [  :windowModel | windowModel delete ].
] fork.

However I finally managed to discover this works...

TabsExample new openWorldWithSpec.
[    (Delay forSeconds: 3) wait.
    PanelMorph allInstancesDo: [  :pm | pm delete ].
] fork.

cheers -ben
On 24 Oct 2013, at 18:51, [hidden email] wrote:

  
Message #openWorldWithSpec: sets a Spec entity to take up the whole World.  How can that be reverted? ...to set the World back to the state delivered with a virgin Pharo image?

cheers -ben

    


  

Reply | Threaded
Open this post in threaded view
|

Re: Reset Spec #openWorldWithSpec:

Benjamin Van Ryseghem (Pharo)
Yes, because when you openInWorld, you do not create a window,
you take Pharo window as container :)

Ben

On 25 Oct 2013, at 14:55, [hidden email] wrote:

Benjamin wrote:
euuuuh

Basically what is done when you open a spec as world is that the background color changed,
all the morph are closed, and the spec is specified to take all the space.

So to revert it, I think you *only* need to close the spec morph, 
set the background color to white, and voilĂ 

Ben
  

Okay.  So this works okay...

TabsExample new openWithSpec.
[    (Delay forSeconds: 3) wait.
    SpecWindow allInstancesDo: [  :windowModel | windowModel delete ].
] fork.

but this does not....

TabsExample new openWorldWithSpec.
[    (Delay forSeconds: 3) wait.
    SpecWindow allInstancesDo: [  :windowModel | windowModel delete ].
] fork.

However I finally managed to discover this works...

TabsExample new openWorldWithSpec.
[    (Delay forSeconds: 3) wait.
    PanelMorph allInstancesDo: [  :pm | pm delete ].
] fork.

cheers -ben
On 24 Oct 2013, at 18:51, [hidden email] wrote:

  
Message #openWorldWithSpec: sets a Spec entity to take up the whole World.  How can that be reverted? ...to set the World back to the state delivered with a virgin Pharo image?

cheers -ben