>>>>> "LordGeoffrey" == LordGeoffrey  <lordgeoff...@optusnet.com.au> writes:

LordGeoffrey> Is there a method that does what magicDo does?
LordGeoffrey> #(#(1 2 true)
LordGeoffrey>    #(2 1 false)) magicDo: [:a :b :r |
LordGeoffrey>         "do something useful"
LordGeoffrey>    ]       _______________________________________________
LordGeoffrey> Beginners mailing list
LordGeoffrey> Beginners@lists.squeakfoundation.org
LordGeoffrey> http://lists.squeakfoundation.org/mailman/listinfo/beginners

what do you want a, b, and r to be?

Maybe the values 1, 2, true the first time, and 2, 1, false the second?

If so:

#((1 2 true) (2 1 false)) do: [:row |
   [:a :b :r | "do something useful" ] valueWithArguments: row.
].

Beware... if your row doesn't have exactly three values, you'll
get an exception.  If you don't want that, consider #valueWithPossibleArgs:

-- 
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<mer...@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Smalltalk/Perl/Unix consulting, Technical writing, Comedy, etc. etc.
See http://methodsandmessages.vox.com/ for Smalltalk and Seaside discussion
_______________________________________________
Beginners mailing list
Beginners@lists.squeakfoundation.org
http://lists.squeakfoundation.org/mailman/listinfo/beginners

Reply via email to