NSTimer issue
NSTimer issue
- Subject: NSTimer issue
- From: Daniel Luis dos Santos <email@hidden>
- Date: Wed, 5 Nov 2008 16:51:33 +0000
Hello,
I have an NSView derived class where I have to do some drawing inside
NSRect.
When pressing a start button, a timer is created with :
+ (NSTimer *)scheduledTimerWithTimeInterval:(NSTimeInterval)seconds
target:(id)targetselector:(SEL)aSelector userInfo:(id)userInfo repeats:
(BOOL)repeats
In the target argument I pass self, and as selector a method of the
class in question. When update is called, the self object has the
address I passed when creating the timer. Inside the method I call
setNeedsDisplay: so the drawRect method is called in the event loop.
That call never happens and only when I force the redrawing of the
view through dragging or overlapping windows, the drawRect is called
but with a different address on self.
I don't understand what is happening. Are there two instances ?
_______________________________________________
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