• 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: menu extras
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: menu extras


  • Subject: Re: menu extras
  • From: John Stiles <email@hidden>
  • Date: Thu, 23 Mar 2006 15:08:11 -0800

Apps aren't supposed to modify files inside their own bundle, for a number of reasons--#1 is that a non-admin user is not authorized to change anything inside the Applications folder.
You can implement it the way you want, but it will involve having two apps: first you need a LSUIElement-based app, and inside its bundle somewhere, you put a separate non-LSUIElement-based app. The main LSUIElement-based app can launch the sub-app as appropriate.
This leads to minor inconveniences of its own--e.g. the Dock command "Show in Finder" will do the wrong thing. But it's the best you can do right now.




On Mar 23, 2006, at 2:55 PM, Mike Abdullah wrote:

There is definitely a key that can be put in the plist to stop your application's icon from appearing in the dock. However:

A. I can't remember what it is! I think it might be something like: LSUIElement

B. I have a sneaky feeling that you actually have to log out and in again in order for the OS to properly register this change to your app.

Hope that helps!
Mike.

On 23 Mar 2006, at 22:43, Alan Smith wrote:

Okay. Is there a way to take it out of the dock once a pref has been set, so you set the pref to remove the icon from the dock then quit and when you launch the app again it's gone from the dock.

I hope it's not impossible, Alan


On 3/23/06, Mike Abdullah <email@hidden> wrote: IIRC, to create an actual menu extra is not a public API. Apple do provide NSStatusBar and NSStatusItem for menu items designed to only appear while your app is running.

However, I'm not sure you can actually take your program out of the
dock whilst it is running if you do that.

Mike.

On 23 Mar 2006, at 22:07, Alan Smith wrote:

> Hi everyone,
> I want a menu extra (one of those cute little menus that reside in
> the menu
> bar on the far right) for my app. I don't want it to be a .menu but
> a .app
> that will appear in the dock, like a regular app, but can then be
> switched
> to just a menu extra, so it's no longer in the dock but just in the
> menu
> bar.
>
> Thanks, Alan
>
> --
> // Quotes from yours truly -------------------------
> "You don't forget, you just don't remember."
>  _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Cocoa-dev mailing list      ( email@hidden)
> Help/Unsubscribe/Update your Subscription:
> 40gmail.com
>
> This email sent to email@hidden




-- // Quotes from yours truly ------------------------- "You don't forget, you just don't remember."

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40blizzard.com


This email sent to email@hidden

_______________________________________________ Do not post admin requests to the list. They will be ignored. Cocoa-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
References: 
 >menu extras (From: "Alan Smith" <email@hidden>)
 >Re: menu extras (From: Mike Abdullah <email@hidden>)
 >Re: menu extras (From: "Alan Smith" <email@hidden>)
 >Re: menu extras (From: Mike Abdullah <email@hidden>)

  • Prev by Date: Re: menu extras
  • Next by Date: Re: NSImages are killing my WindowServer
  • Previous by thread: Re: menu extras
  • Next by thread: Re: menu extras
  • Index(es):
    • Date
    • Thread