On Dec 17, 2008, at 11:23 AM, Eric Lee wrote:

I have an application, and when I exit the window, the timer doesn't stop, so the application freezes.

That's very unclear. What do you mean by "exit" a window? "The timer"? Which timer? Why would you expect a timer to stop when you exit (close?) a window? Why would an application freeze just because a timer hasn't been stopped?

In other words, what the heck are you talking about?


Is there something similar to -(void)awakeFromNib but for stopping a timer when a window closes?

As Randall said, there's a notification. There's also a delegate method, -windowWillClose:. Also, if you're dealing with a custom window subclass, you can override the -close method and take whatever actions you like after invoking super's implementation.

Regards,
Ken

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to