MVC, sender, et al (was: Simple question: How do you store a sender's ID?)
MVC, sender, et al (was: Simple question: How do you store a sender's ID?)
- Subject: MVC, sender, et al (was: Simple question: How do you store a sender's ID?)
- From: Ondra Cada <email@hidden>
- Date: Fri, 9 Apr 2004 11:27:11 +0200
Andreas,
On Friday, Apr 9, 2004, at 07:18 Europe/Prague, Andreas Mayer wrote:
Otherwise, assuming you are designing according to the MVC paradigm,
there should be no need to know the sender outside of your action
method.
Apropos of this: I've often wondered, what's the best style in case you
bind something in IB to an outlet and to an action both:
@interface Controller ... {
IBOutlet widget;
}
IBAction widgetAction:sender { ... }
In the Controller implementation this means that either I use two
different ways in one piece of source to address one object ("sender"
in the action, "widget" elsewhere), or that I use "widget" in the
action. Neither of them feels quite correct to me.
Well, for years I use the former without the slightest problem -- but
still, I don't quite like that. Any ideas? Am I just a fool to be
concerned with that, or do I overlook something obvious all those
years? ;)
---
Ondra Hada
OCSoftware: email@hidden
http://www.ocs.cz
private email@hidden
http://www.ocs.cz/oc
_______________________________________________
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.