Re: NSTimer issue

2008-11-06 Thread Daniel Luis dos Santos
You already answered your own question. If you see two different values for 'self' for two objects of your view subclass then of course there are two instances. The NIB file has a window taken from the pallete, where I have dropped a button and a generic NSView both from the pallete. O

Re: NSTimer issue

2008-11-05 Thread Quincey Morris
On Nov 5, 2008, at 08:51, Daniel Luis dos Santos wrote: 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 m

Re: NSTimer issue

2008-11-05 Thread Devon Ferns
Does self implement the selector? It sort of sounds like you're passing it a selector implemented by a different class and not by whatever class is self in this instance. The selector should be implemented by the target. Devon Daniel Luis dos Santos wrote: In the target argument I pass self

NSTimer issue

2008-11-05 Thread Daniel Luis dos Santos
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)re