Instance Method

activateIgnoringOtherApps:

Makes the receiver the active app.

Declaration

- (void)activateIgnoringOtherApps:(BOOL)flag;

Parameters

flag

If NO, the app is activated only if no other app is currently active. If YES, the app activates regardless.

Discussion

The flag parameter is normally set to NO. When the Finder launches an app, using a value of NO for flag allows the app to become active if the user waits for it to launch, but the app remains unobtrusive if the user activates another app. Regardless of the setting of flag, there may be a time lag before the app activates—you should not assume the app will be active immediately after sending this message.

You rarely need to invoke this method. Under most circumstances, AppKit takes care of proper activation. However, you might find this method useful if you implement your own methods for inter-app communication.

You don’t need to send this message to make one of the app’s NSWindows key. When you send a makeKeyWindow message to an NSWindow object, you ensure that it is the key window when the app is active.

See Also

Activating and Deactivating the App

active

A Boolean value indicating whether this is the active app.

- deactivate

Deactivates the receiver.