Re: Damn sisters :-)
Re: Damn sisters :-)
- Subject: Re: Damn sisters :-)
- From: Matt Rollefson <email@hidden>
- Date: Mon, 10 Dec 2001 11:01:51 -0800
You don't understand -- this *is* the cleaner way. In fact, you should
generally use accessor methods inside a class's implementation as
well -- that way you don't have to worry if you later change the
implementation of your data storage from, say, an instance variable to a
value stored in a dictionary or some such. While it does seem like (and
is) a bit of extra overhead, it's a cleaner model to clearly encapsulate
the information inside the class vs the information exposed outside of
it.
Rollie
On Monday, December 10, 2001, at 10:11 AM, Riccardo Santato wrote:
You are not supposed to have access to another class's data. Create
accessor methods to access the data. For instance,
- (id)myInstanceVariable
{
return myInstanceVariable;
}
I've already thought about this option but I supposed I was rather
stupid
to use a "dummy" function just to pass a variable... I hoped there was a
cleaner way :-))
--
Riccardo Santato
www.riccardosantato.com
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.