NSTimers starting, stopping, pausing...
NSTimers starting, stopping, pausing...
- Subject: NSTimers starting, stopping, pausing...
- From: David Newberry <email@hidden>
- Date: Sat, 11 May 2002 00:41:51 -0700
Hello all,
I am messing around with making a game, and to draw something repeatedly,
I am looking at using an NSTimer to continuously send a message to my
NSOpenGLView subclass.
The game basically needs to do three things: Start, Stop and Pause. To
start, I call
scheduledTimerWithTimeInterval:target:selector:userInfo:repeats:. I'm most
unsure about this call... should I not call it after the timer has
previously been created and invalidated?
To stop the timer, I send the invalidate message.
To pause or unpause the timer, I set a global BOOL variable to either YES
or NO, and check its value in the method which is called by the timer.
At no point (except in the initializing method) do I ever set my timer
variable to nil. However, I am getting a EXC_BAD_ACCESS messages. This is
confusing to me. Is it because of the invalidate message? Possible to tell
from the info I've given?
Thanks all.
Peace,
-David Newberry
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.