Re: Instance method declaration
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