• 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 to make NSWindow redraw vacated rects "ifNeeded"?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to make NSWindow redraw vacated rects "ifNeeded"?


  • Subject: Re: How to make NSWindow redraw vacated rects "ifNeeded"?
  • From: Jerry Krinock <email@hidden>
  • Date: Mon, 9 Apr 2007 09:40:45 -0700


On 2007 Apr, 08, at 20:12, Adam R. Maxwell wrote:

If you use setNeedsDisplay: it can be displayed on the next pass through the runloop, so you can send multiple setNeedsDisplay: messages without actually drawing anything.

That's true; I was simply pointing out the equivalence of -display vs. -displayIfNeeded in the degenerate case.


You can make it more efficient, certainly, using NSUnionRect, - [NSView opaqueAncestor] and other means; I have no idea how your view hierarchy is set up.

Apple has thought about this and optimized it. Have you read <http://developer.apple.com/documentation/Cocoa/Conceptual/ CocoaViewsGuide/Optimizing/chapter_7_section_4.html>? It describes this quite well, and says that using -display should generally be avoided.

Yes, I see. My actual application is to update a progress window during a long task with multiple branches. At some times, depending on the latest result, the user is given the option to check a checkbox, select from a pulldown menu, etc., and then click a button i.e. "Cancel", "No", "Yes". I do this all in the main thread because the app cannot logically continue until the task is complete.


_______________________________________________

Cocoa-dev mailing list (email@hidden)

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


References: 
 >How to make NSWindow redraw vacated rects "ifNeeded"? (From: Jerry Krinock <email@hidden>)
 >Re: How to make NSWindow redraw vacated rects "ifNeeded"? (From: Andrew Farmer <email@hidden>)
 >Re: How to make NSWindow redraw vacated rects "ifNeeded"? (From: Jerry Krinock <email@hidden>)
 >Re: How to make NSWindow redraw vacated rects "ifNeeded"? (From: "Adam R. Maxwell" <email@hidden>)
 >Re: How to make NSWindow redraw vacated rects "ifNeeded"? (From: Jerry Krinock <email@hidden>)
 >Re: How to make NSWindow redraw vacated rects "ifNeeded"? (From: "Adam R. Maxwell" <email@hidden>)

  • Prev by Date: Re: dumb bindings/user defaults question
  • Next by Date: Crash with NSToolbarItem containing custom view
  • Previous by thread: Re: How to make NSWindow redraw vacated rects "ifNeeded"?
  • Next by thread: Re: How to make NSWindow redraw vacated rects "ifNeeded"?
  • Index(es):
    • Date
    • Thread