Re: Redrawing in a custom NSView.
Re: Redrawing in a custom NSView.
- Subject: Re: Redrawing in a custom NSView.
- From: j o a r <email@hidden>
- Date: Sun, 21 Jan 2007 14:05:54 +0100
On Jan 21, 2007, at 7:34 AM, Manuel C. wrote:
I make "numeroDeLados" a global variable 'cos I never see this in
the debugger window, like a instance variable. Like a global, I can
see it under Globals tag in the debugger window.
In the variable outline view you'll find "self" that you can expand
to show the ivars.
When I change the value on the sides, and set "setNeedsDisplay" to
YES, and my window is a resizable window, and resize it, the fancy
shape is redraw whit the actual value of "numeroDeLados", but, if
my window not is resizable, nothing happens with the fancy shape.
So, this is basically a trigging problem. Now, I can think of two
reasons why "-setNeedsDisplay:" would fail:
1) You're calling it from inside "-drawRect:", or
2) You're blocking the run-loop. Pooled drawing updates is done at
the end of the current event.
Add log statements to verify that things happen in the order that you
expect.
j o a r
_______________________________________________
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