Re: Redrawing in a custom NSView.
Re: Redrawing in a custom NSView.
- Subject: Re: Redrawing in a custom NSView.
- From: "Manuel C." <email@hidden>
- Date: Sun, 21 Jan 2007 00:34:03 -0600
Thanks for answer Joar.
I debug the program several times and all the methods are called,
when I change the value from the number or sides, my controller class
(Controlador) calls the method dibujar:num, and the variable
"numeroDeLados" take the value of the "num" argument.
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.
Now...
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.
I try to use:
[self display];
or
[super display];
for force to be called the "drawRect" method, and nothing hapends.
What I can do? :-(
Manuel.
El 20/01/2007, a las 12:03 PM, j o a r escribió:
On Jan 20, 2007, at 6:49 PM, Manuel C. wrote:
All works fine and have the window with the fancy shape in my
screen, but when I change the number of sides and enter to the
method dibujar:num, and set [self setNeedsDisplay: YES]; the fancy
draw not change.
What need to do for the event loop calls the drawRect: method.
Have you verified, using the debugger or printf/NSLog statements,
that your methods are called, and that your state is updated, as
expected?
It seems strange that your "numeroDeLados" variable is a static
variable. From how it's used, it seems more suitable to be an
instance variable?
j o a r
Manuel C.
http://mac-manuelito.blogspot.com
_______________________________________________
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