Re: Exposing Methods in a Framework
Re: Exposing Methods in a Framework
- Subject: Re: Exposing Methods in a Framework
- From: Nick Zitzmann <email@hidden>
- Date: Tue, 30 May 2006 22:50:41 -0600
On May 30, 2006, at 4:55 PM, David Alter wrote:
I have a framework that other developers will use. In it I want to
expose specific methods but not necessary all the instance
variables and methods. I was looking for the preferred way of doing
this with obj-c. I was planning on using a sub class and having the
subclass .h in my framework header folder.
For example here are two classes. The class ForEveryoneToSee does
not expose my instance variables. My framework would have this in
the headers folder. It would not have the .h for ForMeToSee. Is
this the preferred way of doing this?
It'll work if the superclass forwards +allocWithZone: to the concrete
subclass, and the subclass overrides +allocWithZone: to call
NSAllocateObject(), but why are you doing this? If you've got
something to hide, then forget about it - anyone can class-dump your
framework and find the hidden subclass and its instance variables. If
you just want to prevent others from subclassing the class and
overriding the instance variable(s), then mark the variable(s) as
private.
Nick Zitzmann
<http://www.chronosnet.com/>
_______________________________________________
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