How to transfer morphing to a window in Pharo v3

I built a game GUI made of morphs, all of which are embedded in a rectangle. I want to turn this rectangle into a window. How can i do this? I looked inside the Spec but didn't find anything useful.

+3


source to share


2 answers


There are several ways, depending on your use case, but the easiest way is to send #openInWindow

to your morph.



+6


source


If you look at what #openInWindow does, you will be taken to

Morph>>openInWindowLabeled: aString inWorld: aWorld

      



where you can see how the SystemWindow

morph is created and added to it. You can replace it with StandardWindow

if you need a theme.

+1


source







All Articles