XML, Squeak, and speed

Raab, Andreas Andreas.Raab at disney.com
Fri May 11 03:59:45 UTC 2001


Richard,

> If only I understood Text, Paragraphs, and ParagraphEditors 
> well enough, so that I could render XML documents on-screen
> and edit them...

You may want to start from something simple like:

| out |
out _ Text streamContents:[:aStream|
	aStream withAttribute: TextColor red 
		do:[aStream nextPutAll:'Whaddaya mean, give it back???'].
	aStream nextPutAll:'<- this is red and underlined here ->'.
	aStream 
		withAttribute: TextEmphasis underlined
		do:[aStream nextPutAll:'It''s my birthday present!'].
].
(StringHolder new contents: out) openLabel:'Sample Text'.

Note that unless you care about editing, you don't have to understand a lot
about text and such. Have a look at the TextAttribute and its subclasses -
it should take you a good step from there.

Cheers,
  - Andreas





More information about the Squeak-dev mailing list