• 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: accessor question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

References: 
 >RE: accessor question (From: "Jonathan E. Jackel" <email@hidden>)

  • Prev by Date: Re: kitchens
  • Next by Date: Re: Finder & images
  • Previous by thread: RE: accessor question
  • Next by thread: Re: accessor question
  • Index(es):
    • Date
    • Thread