[Question]Yet another question. (Collections)
Jarvis, Robert P. (Contingent)
Jarvisb at timken.com
Wed May 10 19:51:12 UTC 2000
> -----Original Message-----
> From: Karl Ramberg [SMTP:karl.ramberg at chello.se]
> Sent: Wednesday, May 10, 2000 2:28 PM
> To: squeak at cs.uiuc.edu
> Subject: [Question]Yet another question. (Collections)
>
> Thanks for all the answers.
> I learn stuff all the time here :-)
> Now I got another question.
>
> I make a OrderedCollection and I want to display it on the LedMorph. How
> do I
> convert the collection into integers?
>
Assuming your collection is full of strings or numbers already, as in the
following:
col := #('123' '456.789' 0) asOrderedCollection
this should give you a collection of matching numbers:
numbers := col collect: [ :each | each asNumber ]
HTH
Bob Jarvis
Compuware @ Timken
More information about the Squeak-dev
mailing list
|