RE: accessor question
RE: accessor question
- Subject: RE: accessor question
- From: Koen van der Drift <email@hidden>
- Date: Thu, 27 Feb 2003 19:11:33 -0500
At 4:22 PM -0500 2/27/03, Jonathan E. Jackel wrote:
>
I can't say that there is an always-correct answer to this, but an
>
alternative you may not have considered is a "convenience method" in the
>
object which combines common or standard calls, like
>
>
- (void)setMyValueAndRecalculate:(float)aValue
>
{
>
[self setMyValue:aValue];
>
[self recalculate];
>
}
>
That's a good approach. OTOH, in the spirit of how NSTableView is filled
with data, it is possible to 'only calculate when requested', so eg
-(float)myData
{
[self recalculate];
return myData;
}
Maybe even with a _needsRecalculate BOOL added.
MMMV ;)
Thanks for the response, everyone.
- Koen.
_______________________________________________
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.