How to bind a workspace in a bookmorph
Last updated at 4:25 pm UTC on 31 August 2016
Question On 23 April 2004: I'm trying to bind a Workspace inside a page of a BookMorph. How can do this ?
Answer Hernan Tylim
Were you trying with a Workspace in a SystemWindow? If you're not interested in the window's frame you can use this (evaluate it in a workspace):
on: Workspace new
menu: #codePaneMenu:shifted:) openInHand.
And drop it into the BookMorph page.
But if what you want is the workspace and the SystemWindow then you can put the window over the BookMorph page. Invoke the Workspace halo (alt+click over the SystemWindow) and click on the red button. Use the 'embed into' option there to embed the SystemWindow into the Page.
Answer How to save a parts bin
Either use the halos on a Workspace window to drag out the PluggableTextMorph and add it to a page, or do something like this:
layoutPolicy: ProportionalLayout new;
addMorph: ((PluggableTextMorph on: Workspace new text: #contents =accept:
#acceptContents: readSelection: nil menu: #codePaneMenu:shifted:))
fullFrame: (LayoutFrame fractions: (0@0 corner: 1@1)
offsets: (10@10 corner: -10@-10))
Answer Lex Spoon
In addition to the other replies, you can also turn on #systemWindowEmbedOK in the "windows" area of the preferenes browser. Then you can drag and drop windows into bookmorphs. You also need to turn off fastDragWindowForMorphic. This is probably a good idea anyway on any reasonably new machine.