• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Make an Application active?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Make an Application active?


  • Subject: Re: Make an Application active?
  • From: m <email@hidden>
  • Date: Mon, 14 Jun 2004 15:12:38 -0700

On Jun 14, 2004, at 1:53 PM, j o a r wrote:

On 2004-06-14, at 22.32, Malte wrote:

Is there a way to make an application active (while it's obviously not
active).

[snip]

Check AppKit > NSApplication and its "activateIgnoringOtherApps:"
method. Note that it's often *very* irritating if something pops up in
front of what you're working with - use this method with caution!

A trick I've used in the past when I need to alert the user of something from normally faceless apps (NSStatusMenu type things, for example) is to use a "helper" app to actually puts up the alert.

When I need to alert the user of something:

1) Launch helper app in background (I use Process Manager to do this)

2) The helper app puts up the alert

3) Because the helper app has opened an alert, the app's icon starts to bounce in the dock, attracting the user's attention.

4) The user is then free to click on the app's dock icon to bring the alert forward, or to ignore it for the moment.

This approach actually has two advantages if you're writing a faceless app.

a) it doesn't annoy users as much

b) it gives the user an easy way to get to the alert should he or she accidently or deliberately activate another app while the alert is up.

_murat
_______________________________________________
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.


References: 
 >Make an Application active? (From: Malte <email@hidden>)
 >Re: Make an Application active? (From: j o a r <email@hidden>)

  • Prev by Date: Practicing What One Preaches (was Panther is flipping my text)
  • Next by Date: Re: objc-class.h: why is marg_prearg_size = 128
  • Previous by thread: Re: Make an Application active?
  • Next by thread: Re: Make an Application active?
  • Index(es):
    • Date
    • Thread