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

Re: MenuStatusItem --


  • Subject: Re: MenuStatusItem --
  • From: "Clint Shryock" <email@hidden>
  • Date: Mon, 29 Jan 2007 08:47:46 -0600

Unfortunately I don't know the answer, I just read the documentation for
NSStatusBar and NSMenu this past weekend and remembered that caveat.

i've copied the list so hopefully someone will be able to help you

+Clint


On 1/29/07, info by maconf <email@hidden> wrote:

thank for your help Clint, if you can, this is my simple chunk of code..

m_item = [[bar statusItemWithLength:NSVariableStatusItemLength]retain];
 [m_item setTitle: NSLocalizedString(@"poorVista",@"")];
[m_item setHighlightMode:YES];
 m_menu = [[[NSMenu alloc] init] retain];

 [m_menu setAutoenablesItems:NO];
 [m_menu addItem: [[NSMenuItem alloc] initWithTitle: NSLocalizedString(@"Item
One",@"") action:@selector(selItemOne:) keyEquivalent:@""]];


bar is a pointer to NSStatusBar, m_menu and m_item are both pointers at NSMenu and NSMenuItem . Now, inside my new SystemPreferences when enable a control i can load the new menubar. Now how can make to fix permanently this new menubar after a machine restart?

Thanks
marco

On Jan 29, 2007, at 1:44 PM, Clint Shryock wrote:

Are you retaining the status bar item after you create it?  If you're
using objective-C you have to explicitly retain it.

http://developer.apple.com/documentation/Cocoa/Conceptual/StatusBar/index.html#//apple_ref/doc/uid/10000073i



On 1/28/07, info by maconf < email@hidden> wrote:
>
> Hello list,
>
> so i have develop a preferences pane with a simple menustatusItem in
> the up right corner; the menubar is enabled when i active a control
> checkbox and this run. My problem appears when close the preferences
> window, that released this resource. How can make to anchor
> permanent  this menu, as some apple preferences, when the preferences
> window is closed??
>
> many thanks list
> Marco
>
> ** sorry for my UK
> _______________________________________________
>
> Cocoa-dev mailing list ( email@hidden)
>
> 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
>



_______________________________________________

Cocoa-dev mailing list (email@hidden)

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


  • Follow-Ups:
    • Re: MenuStatusItem --
      • From: Uli Kusterer <email@hidden>
References: 
 >MenuStatusItem -- (From: info by maconf <email@hidden>)
 >Re: MenuStatusItem -- (From: "Clint Shryock" <email@hidden>)

  • Prev by Date: Re: NSTableView with bindings as a drag destination.
  • Next by Date: Application information that all users can see
  • Previous by thread: Re: MenuStatusItem --
  • Next by thread: Re: MenuStatusItem --
  • Index(es):
    • Date
    • Thread