Implementation and usage of activateIgnoringOtherApps

In days of old, when try to get an app to have focus, I’d have used

tell "Bob.app" to activate

I’d like to move, as much as possible, to using Cocoa methods instead.

I’ve found the function: - (void)activateIgnoringOtherApps:(BOOL)flag

However, whichever way I try and implement it, I get errors in console

I’ve tried all sorts of combinations of

tell current application's NSApp to activateIgnoringOtherApps(YES)

to no avail. Ideas?

You forgot the trailing underscore, activateIgnoringOtherApps_.

For the record, I get “unrecognized selector sent to instance”

working splendidly :slight_smile:

thanks shane

PS: Calling Cocoa methods in your book is really beginning to help. I have a long way though…