• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Missing Obj-C Category Method Implementations: No linker errors?!?!
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: Missing Obj-C Category Method Implementations: No linker errors?!?!
      • From: Jonas Maebe <email@hidden>
References: 
 >Missing Obj-C Category Method Implementations: No linker errors?!?! (From: Jerry Krinock <email@hidden>)
 >Re: Missing Obj-C Category Method Implementations: No linker errors?!?! (From: Jonas Maebe <email@hidden>)

  • Prev by Date: Re: Missing Obj-C Category Method Implementations: No linker errors?!?!
  • Next by Date: Re: Missing Obj-C Category Method Implementations: No linker errors?!?!
  • Previous by thread: Re: Missing Obj-C Category Method Implementations: No linker errors?!?!
  • Next by thread: Re: Missing Obj-C Category Method Implementations: No linker errors?!?!
  • Index(es):
    • Date
    • Thread