• 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: Instance method declaration
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Instance method declaration


  • Subject: Re: Instance method declaration
  • From: Sherm Pendley <email@hidden>
  • Date: Sun, 21 May 2006 23:52:09 -0400

On May 21, 2006, at 10:41 PM, Erik Buck wrote:

It is also worth mentioning that just like not all implemented methods have to be declared in the interface, is not always necessary to implement all declared methods.

If you want to do this, then declaring the un-implemented methods in a category will prevent "incomplete implementation" warnings. I've found that to be especially handy when those methods are implemented in another language, but need to be declared so that they can be called from Objective-C without those warnings.


It's also worth mentioning that not all methods need to be declared in the same header file. You can split up your public and private interfaces, and include only the public interface in the header you distribute. The private interface you can declare as a category in a separate header.

And last but not least, you should be aware that opting to not include a method in a header file is not a very effective means of hiding it from prying eyes - it will still be listed in a class-dump of the compiled binary.

sherm--

Cocoa programming in Perl: http://camelbones.sourceforge.net
Hire me! My resume: http://www.dot-app.org

_______________________________________________
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


References: 
 >Re: Instance method declaration (From: Erik Buck <email@hidden>)

  • Prev by Date: Re: Problem connecting to Oracle 10g via 'Instant Client's dylibs'
  • Next by Date: Runtime difference on "some" hardware? (Was: Re: Instance method declaration)
  • Previous by thread: Re: Instance method declaration
  • Next by thread: Runtime difference on "some" hardware? (Was: Re: Instance method declaration)
  • Index(es):
    • Date
    • Thread