drawRect not getting called when needed under OS X
drawRect not getting called when needed under OS X
- Subject: drawRect not getting called when needed under OS X
- From: Tom Jeffries <email@hidden>
- Date: Sat, 23 Jul 2011 20:46:30 -0700
I am using a window that uses a subclass of NSView. Part of it is drawn when
the program starts, another part needs to be drawn when the user clicks on a
button in another window. The code for the other window calls my subclass of
NSView with no problems, creates the new graphics, and then returns.
However, the window that needs to get updated with new graphics does not
change.
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.
Thanks, Tom Jeffries
_______________________________________________
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