Conrad Shultz wrote: > On 11/16/10 5:27 PM, eveningnick eveningnick 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"? >> All i could think of - is installing a global event tap (but i need >> accessibility Enabled then all the time - it is neither a good idea) >> and watch some Shortcut pressed on a keyboard. > > If I'm understanding what you are asking, why not put an icon in the > menu bar? I'm referring to the icon(s) to the left of the clock, e.g. > volume, Wi-Fi, Bluetooth, etc. The pertinent classes are NSStatusItem > and NSStatusBar. (Be sure to read the usability notes in the latter.) > > Several applications use this for what I think you describe. (I > currently have NSStatusItems from Tweetie, Dropbox, and Growl.)
For what it's worth, I'm increasingly getting pushback from users about NSStatusItems. Some people really seem to resent things taking space there. _______________________________________________ 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