Newbie question

Michael Perscheid michaelperscheid at gmx.de
Mon Jul 23 14:20:29 UTC 2007


Hi Richard,

I hope this can help you. Try something like this
#(1 2) with: #(3 4) do: [:a :b | Transcript show: a*b asString; cr]

Attention: Both collections must have the same size.

Regards
Michael Perscheid

PS: Use the beginner list for such questions, too.


________________________________________
Von: squeak-dev-bounces at lists.squeakfoundation.org
[mailto:squeak-dev-bounces at lists.squeakfoundation.org] Im Auftrag von
Richard Eng
Gesendet: Montag, 23. Juli 2007 16:08
An: The general-purpose Squeak developers list
Betreff: Newbie question

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"]
 
 
No matter how I try to code the #with: part, I keep getting thrown into
debug. How do you specify a collection of classes for the above example?
 
Thanks,
Richard




More information about the Squeak-dev mailing list