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 7:24 pm UTC on 25 October 2017
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'