links to this page:    
View this PageEdit this PageUploads to this PageHistory of this PageTop of the SwikiRecent ChangesSearch the SwikiHelp Guide
Open a Workspace with content
Last updated at 6:36 pm UTC on 31 August 2016
To programmatically open a workspace with some text already in it, execute this Squeak code:

  new textContents: ('Hello  World!! This is a test.') 
  openLabel: 'Workspace test'

With Text

TextStyle default font sizes.png

 | currentFont fa string textStream |
 textStream := TextStream on: (Text new: 5000).

 currentFont := TextStyle default.
fa := currentFont fontArray.
fa do: [:font | 
textStream withAttribute: 
                (TextFontReference toFont: font)
                    do: [textStream nextPutAll: font pointSize asString, ': ', string; cr].
   Workspace new
    contents: textStream contents;
    openLabel: 'TextStyle default font sizes'