advice needed about default arguments for a method
Stéphane Rollandin
lecteur at zogotounga.net
Fri Dec 10 10:13:06 UTC 2004
Ingo Hohmann wrote:
> What I've seen used in the image, is just having an easier method call
> the workhorse with its defaults, e.g.
>
> Function class>>sineAmp
>
> ^ self sineAmp: 1 period: 1
>
>
> I'm not sure whether its applicable to your problem, though.
>
well, not quite, since I'd like to grab the method with arguments and
from it get the method with default arguments. so I would have the same
problem with your idea: how does #sineAmp:period: know that its default
implementation is #sineAmp ?
... another problem is that I want the default parameters themselves,
that is, in your example, #(1 1). having only the result of sending
#sineAmp is not enough.
regards,
Stef
More information about the Squeak-dev
mailing list
|