• 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: How Can I Notify DrawRect Method?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How Can I Notify DrawRect Method?


  • Subject: Re: How Can I Notify DrawRect Method?
  • From: "I. Savant" <email@hidden>
  • Date: Tue, 9 Dec 2008 20:25:34 -0500

On Dec 9, 2008, at 8:09 PM, Ricky Sharp wrote:

In some cases, other attributes, when set, will 'dirty' that flag followed by a setNeedsDisplay. Colors will then be re-fetched/ created and then reused until the next change comes along.

Perfectly good example of "timely optimization".

The main reason (which I may not have communicated clearly) is because any unnecessary work at all is wasteful. Especially for mobile platforms (laptop and iPhone users will thank you for sparing their battery life ... or curse you for not caring).

Asking for the shared user defaults instance, then asking it for a value, then unarchiving a more useful object from it, *then* using it to draw is certainly more work than caching the value only when it changes. It's not like it's performance tuning - it's *basic design*.

--
I.S.


_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: How Can I Notify DrawRect Method?
      • From: "Sean McBride" <email@hidden>
    • Re: How Can I Notify DrawRect Method?
      • From: "Michael Ash" <email@hidden>
    • Re: How Can I Notify DrawRect Method?
      • From: Graham Cox <email@hidden>
    • Re: How Can I Notify DrawRect Method?
      • From: Ricky Sharp <email@hidden>
References: 
 >How Can I Notify DrawRect Method? (From: "Chunk 1978" <email@hidden>)
 >Re: How Can I Notify DrawRect Method? (From: "I. Savant" <email@hidden>)
 >Re: How Can I Notify DrawRect Method? (From: "Michael Ash" <email@hidden>)
 >Re: How Can I Notify DrawRect Method? (From: "I. Savant" <email@hidden>)
 >Re: How Can I Notify DrawRect Method? (From: Ricky Sharp <email@hidden>)

  • Prev by Date: Custom NSTableView cells
  • Next by Date: Re: The thread that starts by NSTask didn't clear up
  • Previous by thread: Re: How Can I Notify DrawRect Method?
  • Next by thread: Re: How Can I Notify DrawRect Method?
  • Index(es):
    • Date
    • Thread