Re: how do I save prefs when the app is Force Quit?
Re: how do I save prefs when the app is Force Quit?
- Subject: Re: how do I save prefs when the app is Force Quit?
- From: Alexander Dymerets <email@hidden>
- Date: Sun, 14 May 2006 21:50:27 +0300
- Organization: The Product Engine (Odessa)
Alan Smith wrote:
I need to save prefs but want it to be done even if the app is force
quit. Does anyone know how?
void catch_term(int sig_num)
{
if (sig_num!=SIGTERM) return;
[myPreferences save];
exit(0);
}
int main(int argc, const char *argv[])
{
signal(SIGTERM, catch_term);
return NSApplicationMain(argc, argv);
}
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden