Le 17 nov. 2010 à 05:21, John Joyce a écrit :

> 
> On Nov 17, 2010, at 12:40 PM, Kyle Sluder wrote:
> 
>> On Tue, Nov 16, 2010 at 5:27 PM, eveningnick eveningnick <
>> eveningn...@gmail.com> 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

You can also consider the option Apple chosen with Spaces, Dashboard, and 
Expose. Deploy a real application bundle that launch this panel when double 
clic it.


-- Jean-Daniel




_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to