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

Re: Newbie NSView question.


  • Subject: Re: Newbie NSView question.
  • From: mmalcolm crawford <email@hidden>
  • Date: Wed, 15 Oct 2003 09:38:48 -0700

On Oct 15, 2003, at 1:19 AM, Alastair J.Houghton wrote:

No, but if you want to draw from elsewhere, you need to call -lockFocus and -unlockFocus on your view. Apple recommends that you use -drawRect: and -setNeedsDisplay: (or -setNeedsDisplayInRect:) in most cases, because it allows the system to determine when to redraw your view (so redraw requests can be optimised),

I'm sure Alastair meant the right thing, however lest it be misinterpreted:

It is recommended that you implement your drawing routines in -drawRect:. You call setNeedsDisplay: or -setNeedsDisplayInRect: to cause a redraw. You should not call -drawRect: directly to cause a redraw.

mmalc
_______________________________________________
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: Newbie NSView question. (From: "Alastair J.Houghton" <email@hidden>)

  • Prev by Date: Re: Document-based application and "complex" save
  • Next by Date: Re: XML support in cocoa
  • Previous by thread: Re: Newbie NSView question.
  • Next by thread: More on dictionaries
  • Index(es):
    • Date
    • Thread