Hi I have an ordered collection of strings which I'm trying to display on a list widget. I do the following:
self displayWidget list: coll.
where displayWidget is a List Widget and coll is the OrderedCollection containing the strings. It will display it, but it displays it in a single line.
Instead of getting
line one
line two
line three
I get:
line oneline twoline three
I'm using visual works.*
You can iterate the collection and send withCRs message to the Strings.
Here is an simple example:
| i |
i:= 0. [i < 5] whileTrue: [ Transcript show: 'Hello world.\' withCRs. i := i +1.
]
withCRs method replace each \ ocurrence for a new line and carry return.
Hope it helps you.