swarm-support
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Function as an argument


From: Marcus G. Daniels
Subject: Re: Function as an argument
Date: 03 Apr 2000 20:30:14 -0700
User-agent: Gnus/5.070084 (Pterodactyl Gnus v0.84) Emacs/20.4

>>>>> "AO" == Akiko Ogawa <- RS/GIS lab <address@hidden>> writes:

AO> - goThroughEggsWith: (SEL) methodName InObj: obj {
AO>   for (i=0;i<cartonSize;i++) {
AO>   id egg = [eggCartonList atOffset: i];
AO>   [obj perform: M(methodName) with: egg];
AO>  }
AO>  ...
AO> }

The M(methodName:) syntax only needs to be used once to get the
selector; it converts from the string name to the selector object.
Once you've got it, then it makes more sense to call it a "sel" or
something like that.  So it would be like "[obj perform: sel with: egg]".

                  ==================================
   Swarm-Support is for discussion of the technical details of the day
   to day usage of Swarm.  For list administration needs (esp.
   [un]subscribing), please send a message to <address@hidden>
   with "help" in the body of the message.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]