Newbie question

nicolas cellier ncellier at ifrance.com
Mon Jul 23 14:28:18 UTC 2007


Richard Eng <horrido.hobbies <at> gmail.com> writes:

> 
> 
> I want to do something like...
>  
> #('some text 1'  'some text 2'  'some text 3'  'some text 4')
> with: "a corresponding list of classes, say, {class1  class2   class3  class4}"
> do:
>     [:each1 :each2 |
>     "do something with <each1 text> and <each2 class> pair"]
>  


Use a period separator in brace construct.
{Class1. Class2. Class3. Class4}

Otherwise, it is interpreted as send message: class4 to: (result of send
message: class3 to: (result of send message: class2 to: class1))

Nicolas






More information about the Squeak-dev mailing list