Protocol compiler hint vs no hint....
Protocol compiler hint vs no hint....
- Subject: Protocol compiler hint vs no hint....
- From: "Frederick C. Lee" <email@hidden>
- Date: Sun, 10 Jul 2005 11:38:12 -0700
Greetings:
I came across the following piece of code written by Joar
Wingfors on Tue Dec 02 2003 {MainController.m of
SubviewTableViewRuleEditor }.
He uses a protocol hint to aid 'static typing' (via Cocoa Programming
book by Scott Anguish et al).
I decided to static code via the 2nd method, using explicit
(NSMenuItem *).
- (void) changeRuleType:(id < NSMenuItem >) sender { // Notice the
< protocol > hint
vs...
- (void) changeRuleType:(NSMenuItem *) sender { // no hint.
------
Question: Is there any benefit of using a protocol vs just declaring
the static type?
Regards,
Ric.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden