Re: What is Mac's "custom" for an agent to display its GUI?
Re: What is Mac's "custom" for an agent to display its GUI?
- Subject: Re: What is Mac's "custom" for an agent to display its GUI?
- From: John Joyce <email@hidden>
- Date: Wed, 17 Nov 2010 13:21:29 +0900
On Nov 17, 2010, at 12:40 PM, Kyle Sluder wrote:
> On Tue, Nov 16, 2010 at 5:27 PM, eveningnick eveningnick <
> email@hidden> wrote:
>> Hello!
>> I have to write an application, that should run on the background.
>> When the user needs, it should display some control panel. On Windows
>> system i would have used System tray, and an icon there - when the
>> user clicks on that icon, it displays some GUI. but what is the Mac's
>> usual practice? I am thinking that the analog to that tray application
>> is an agent, launched by launchd. On what event it is considered to be
>> good to trigger that "control panel"?
>
> It depends on what you're writing.
>
> Don't use the status area (near the clock) just to provide access to your
> app. If you're writing a VPN client or something else whose status needs to
> be monitored continuously, the status area is a good place to put your UI: a
> status item with a menu that afford access to the app's
> configuration/preferences dialog.
>
> But don't use the status area for transient things. If you're writing a
> backup app, for example, and don't feel like burdening your users' status
> area with mundane "backups are happening" information, don't all of a sudden
> put UI to alert the user that something's gone wrong. But then how do you
> alert the user or let them configure things?
>
> If you have no configuration options (the only interaction you need in your
> background app is to alert the user) you can use the CFNotification API. If
> you *do* have configuration, then create an app that only configures things,
> and embed your background app as a helper tool inside this app wrapper. When
> you need to show UI, have your background app launch the main app that it's
> a part of.
>
> Alternatively, your main "app" could be a system preferences pane rather
> than a full-blown app.
>
> --Kyle Sluder
> _______________________________________________
Additionally, consider your target users hardware...!!!!
There are too many apps with Status Items these days. It's getting to be like Windows' system tray junk.
Remember the real estate is extremely limited on anything smaller than a 17 inch MacBook Pro, and even that is fairly limited if the active application has many menus.
If your primary users mostly have 27 inch displays or bigger, add as much as you like.
Seriously consider including a check on the size of display during status item activation and informing the user that this will take up significant space on small displays.
You should avoid making a Status Item required. It should always be optional. It should not be a shortcut to the app, that is what the Dock is intended for. Hence, the name Status Item.
If you do not actually display any information in the Status Item, or not constantly need to display (like battery level), then you should consider just building a Preference Pane for System Preferences and a Dashboard widget for status and/or launch and/or control.
The Dashboard widget approach is a lot more considerate of the end user's real estate.
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden