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.
-Shawn
_______________________________________________
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