Squeak
  links to this page:    
View this PageEdit this PageUploads to this PageHistory of this PageTop of the SwikiRecent ChangesSearch the SwikiHelp Guide
How to create a hyperlink in a Text
Last updated at 8:33 pm UTC on 1 September 2016
Example was by Boris Gaertner 5-Jul-2003

Create a an instance of Text (aTextStream contents) with a hyperlink in it:


 | ts |
  ts := TextStream on: (Text new).
  ts nextPutAll: 'Squeak is a beautiful language. Look at '.
  ts withAttribute: (TextURL new url: 'http:\\www.squeak.org')
     do:
      [ ts nextPutAll: 'http:\\www.squeak.org'].
  ts nextPutAll: ' to learn more about it.'.

 (Workspace new contents: ts contents) openLabel: 'Here is your Hyperlink:'