Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Apple should get behind Cocoa Java



On Aug 24, 2006, at 1:45 PM, Shawn Erickson wrote:

On 8/24/06, Wagner Truppel <email@hidden> wrote:

On the flip side, protocols (the Obj-C analog of interfaces) aren't
binding, so you can't be *guaranteed* that a class implementing a
particular protocol will implement *all* of its methods.

Actually if you define a @protocol and you state that your class implements that protocol and you don't implement it the compiler will complain.

In Cocoa delegation doesn't often use a @protocol (a formal protocol)
but instead they use what is termed an informal protocol. On common
use of delegation in Cocoa is to allow a delegate to optionally modify
behavior of a class it is a delegate of. The optional aspect comes
from only having to implement the delegate methods you want to
implement (the ones that affect what you want to affect). If the
delegate doesn't implement a method then the default behavior is used.

Review the following for more information...
<http://developer.apple.com/documentation/Cocoa/Conceptual/ ObjectiveC/Articles/chapter_4_section_7.html#//apple_ref/doc/uid/ TP30001163-CH7-BAJJABHJ>


-Shawn

Didn't I say I was a Cocoa newbie? :)

Thanks for the correction.

Wagner
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Java-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/java-dev/email@hidden

This email sent to email@hidden
References: 
 >Re: Apple should get behind Cocoa Java (From: Wagner Truppel <email@hidden>)
 >Re: Apple should get behind Cocoa Java (From: Hsu <email@hidden>)
 >Re: Apple should get behind Cocoa Java (From: Wagner Truppel <email@hidden>)
 >Re: Re: Apple should get behind Cocoa Java (From: "Shawn Erickson" <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.