Re: Missing Obj-C Category Method Implementations: No linker errors?!?!
Re: Missing Obj-C Category Method Implementations: No linker errors?!?!
- Subject: Re: Missing Obj-C Category Method Implementations: No linker errors?!?!
- From: Phillip Hutchings <email@hidden>
- Date: Sat, 14 Mar 2009 21:17:56 +1300
On 14/03/2009, at 20:41, Jonas Maebe wrote:
On 14 Mar 2009, at 05:57, Jerry Krinock wrote:
I understand I'm not getting any build errors since the #imports
are including all the required declarations. But why don't these
omissions of category implementations generate linker errors?
http://developer.apple.com/documentation/Cocoa/Conceptual/ObjectiveC/Articles/ocProtocols.html#//apple_ref/doc/uid/TP30001163-CH15-114323
http://developer.apple.com/documentation/Cocoa/Conceptual/ObjectiveC/Articles/ocObjectsClasses.html#//apple_ref/doc/uid/TP30001163-CH11-SW1
is probably a better answer.
In short, it's not a linker error because it's not an error. Objective-
C doesn't check until runtime, as the missing method is a runtime
exception, and can be caught and handled at runtime if needed. The
compiler will generate a warning though.
I suggest you take a quick readthrough of the documentation linked, it
explains quite a few things about the Objective-C runtime.
--
Phillip Hutchings
email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden