Quitting screensavers programmatically
Quitting screensavers programmatically
- Subject: Quitting screensavers programmatically
- From: Kevin Ballard <email@hidden>
- Date: Thu, 18 Mar 2004 20:45:45 -0500
I have a client that wants me to write a screensaver that, when opened,
launches another program and quits the screensaver. This other program
is a full-screen app that's basically an interactive screensaver.
However, the ScreenSaver framework provides no way to tell it to quit
out of the screensaver. I tried using [NSApp terminate:nil] but that
seemed to cause intermittent problems with the hot corner and timer
working. After a bunch of looking around, I found an undocumented
method _cancelKey: and when I trigger that (passing nil as the
argument), it works great (at least in the real screensaver - system
preferences ignores it, but when the other app starts up it cancels the
system preferences test screensaver). However, this *is* an
undocumented method, so I'd rather not rely on it.
Is there any way to quit out of a screensaver programmatically without
relying on an undocumented method like this?
--
Kevin Ballard
email@hidden
http://www.tildesoft.com
http://kevin.sb.org
[demime 0.98b removed an attachment of type application/pkcs7-signature which had a name of smime.p7s]
_______________________________________________
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.