Will Oram wrote:
>
> It's summer, and I'm studying Cocoa while I still can. I like to experiment
> more than most textbooks can handle, so bear with me as I fill this
> newsgroup with easy questions.
>
> The question of the moment:
>
> In a specific app, I am making it the controller's job, among other things,
> to identify by ID which of three buttons has been pushed. This value will be
> passed on to the model. What method could do this, and how would it be
> applied?
Generally speaking, you shouldn't care which button sent the message,
but rather which message it sent.

With very little information about what you're doing, I would implement
-doThis:, -doThat:, and -doTheOther: as separate methods, and set the
action of each button to a different selector.

If you're doing something like a calculator app though, and you don't
want a different method for each digit button, you'd typically set a tag
value on each button cell in the interface builder, and then use the
-tag message to get the tag's value.

-jcr