Re: Simple question: How do you store a sender's ID?
Re: Simple question: How do you store a sender's ID?
- Subject: Re: Simple question: How do you store a sender's ID?
- From: Andreas Mayer <email@hidden>
- Date: Fri, 9 Apr 2004 07:18:50 +0200
Am 08.04.2004 um 23:28 schrieb Jonathan E. Jackel:
You also could set up an instance variable, with a setter and getter
method,
and pass the sender to the setter.
[self setTextFieldThatSentAction:sender];
The setter would retain the sender and release it when done. Make
sure to
dealloc properly to avoid leaks.
While this is formally correct, it sounds like a bad design.
If you need to refer to a specific control, you'd usually establish an
outlet using Interface Builder.
Otherwise, assuming you are designing according to the MVC paradigm,
there should be no need to know the sender outside of your action
method.
Andreas
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.