Converting from Carbon Event Manager to NSTimer

2008-09-23 Thread Dan Birns
I'm trying to convert from Carbon to Cocoa for a number of reasons which I won't go into here. My application needs to set a timer that causes a function to be called at a time in the future. This is non-repeating, and sometimes has be immediate. I need it to be as efficient as possible,

Re: Converting from Carbon Event Manager to NSTimer

2008-09-26 Thread Dan Birns
I have my problem largely resolved, and I thought I'd share the resolution. Some have written pointing out that the following code has a bug: timer = [NSTimer alloc]; [timer initWithFireDate:[NSDate date] interval:t target:self selector:@selector(mainLoopTimer:) userInfo:hal

Async alert

2008-11-11 Thread Dan Birns
I need an asynchronous alert panel. My impression is that apple doesn't consider this an alert if it's aynchronous. A couple ideas occur to me for how to solve this: 1) Put the alert in a separate thread. But these seems to be a lot of effort to get around a purposeful design, and thus far