Reset Spec #openWorldWithSpec:
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
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, btc@openinworld.com 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
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, btc@openinworld.com 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, btc@openinworld.com 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
participants (3)
-
Benjamin -
Benjamin -
btc@openinworld.com