• Das kreative Thema des Monats Oktober wird vor allem diejenigen unter Euch besonders ansprechen, denen Do-it-yourself quasi im Blut liegt. Zeigt uns Eure Improvisationskünste oder fotografiert, was andere Leute sich so im Alltag zusammengestrickt haben. --> Zum Mitmachen bitte hier klicken

kUIOptionDisable...

iMensch

Auralia
Registriert
15.09.07
Beiträge
202
Hallo.

ich möchte ein Programm in XCode erstellen, welches sich nicht durch Apple-Q oder Cmd-Alt-Esc beenden lässt. dieses Programm soll als Startobjekt für meinen Party Account genutzt werde, so dass kein Programm ausser diesem ausgeführt werden kann. per kUIOptionDisableForceQuit und kUIOptionDisableProcessSwitch habe ich schonmal so ziemlich alles abgedeckt, nur lässt sich das Programm noch Simpel Per Apple-Q Beenden :-(

Gibt es eine Möglichkeit, dies zu verhindern?
 
Ich kann dir auf deine Antwort keine Frage geben, allerdings stellt sich mir bei deinem Vorhaben eine Frage:

Wie willst du deinen Mac dann runter fahren? Das Programm wird doch sicher das runter fahren verhindern, oder?
 
Das Runterfahren wird nicht verhindert.
Das Programm behindert: ForceQuit, Ausblenden, AppSwitching (Per cmd-tab) und es soll eben noch das Beenden per Apple-Q bzw. Programmmenü verhindern ;)

Ich gebe zu, ich schreibe etwas verwirrt
 
Hi iMensch,

sind wir in einer Cocoa Applikation? Dann kannst du das Apfel-Quitten deiner App so unterbinden (im Delegate deiner NSApp):

Code:
- (NSApplicationTerminateReply)applicationShouldTerminate:(NSApplication *)sender
{
	return NSTerminateCancel;
}

Grüße,

NSObject
 
"Features of the SystemUIMode API
In Mac OS X 10.2 two important kiosk-related APIs were added to the system SetSystemUIMode and GetSystemUIMode. Overall the SystemUIMode API provides the following abilities:

control Dock show/hide behavior

control menu bar show/hide behavior

control which Apple menu elements are active

disable process switching through Command-Tab and Command-Shift-Tab keyboard equivalents

disable Force Quit window available via Command-Option-Escape key equivalents or via the Apple menu

disable the PowerKey window which is displayed when the Power button is pressed"


Alex