• 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: drawRect not getting called when needed under OS X
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: drawRect not getting called when needed under OS X


  • Subject: Re: drawRect not getting called when needed under OS X
  • From: Graham Cox <email@hidden>
  • Date: Sun, 24 Jul 2011 14:06:46 +1000

On 24/07/2011, at 1:46 PM, Tom Jeffries wrote:

> When I put both the beginning graphics and the graphics that are to be drawn
> later in the initial drawRect call everything is drawn without a problem.
> However, drawRect does not get called when the user clicks the button on the
> second window. I've tried awakeFromNib, setNeedsDisplay, needsDisplay, and
> display, but nothing I've found so far gets the NSView window to call
> drawRect.
>
> I am fairly new to OS X programming and appreciate any hints you can throw
> my way.


Show your code.

You don't call drawRect: - the framework does. You can tell the framework it needs to be called by calling the view's -setNeedsDisplay: method. Are you doing that?

How does the button come into it? How are you responding to the button? That's the trouble - what you've said so far is far too vague, it could be a thousand different things (but probably something simple).

--Graham


_______________________________________________

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: drawRect not getting called when needed under OS X
      • From: Tom Jeffries <email@hidden>
References: 
 >drawRect not getting called when needed under OS X (From: Tom Jeffries <email@hidden>)

  • Prev by Date: drawRect not getting called when needed under OS X
  • Next by Date: Re: drawRect not getting called when needed under OS X
  • Previous by thread: drawRect not getting called when needed under OS X
  • Next by thread: Re: drawRect not getting called when needed under OS X
  • Index(es):
    • Date
    • Thread