• 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: Finder-like color label menu item in Cocoa?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Finder-like color label menu item in Cocoa?


  • Subject: Re: Finder-like color label menu item in Cocoa?
  • From: Pascal Pochet <email@hidden>
  • Date: Mon, 24 Jul 2006 13:08:06 +0200

Doesn't seem to help/work. I tried

    extern MenuRef _NSGetCarbonMenu( NSMenu* menu );
    MenuRef mainMenuRef = _NSGetCarbonMenu([NSApp mainMenu]);

and mainMenuRef is set to 0.

Thinking that you might have meant NSMenuItem, I tried

extern MenuRef _NSGetCarbonMenu( NSMenuItem* menu );
NSMenuItem* layersMenuItem = [[NSApp mainMenu] itemWithTag:MENU_LAYER];
MenuRef layerMenuRef = _NSGetCarbonMenu(layersMenuItem);


and layerMenuRef gets set to 0.

Besides, "private" functions make me really nervous.

I'm interested in the end product once you get it working. :)

So am I. :)



yes because the right function to call is now (d
    extern MenuRef _NSGetCarbonMenu2(id);

don't remember if it's after Panther or Tiger that the changes occurred…)
and you pass a NSMenu * as parameter…



Pascal Pochet 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


  • Follow-Ups:
    • Re: Finder-like color label menu item in Cocoa?
      • From: James Bucanek <email@hidden>
References: 
 >Re: Finder-like color label menu item in Cocoa? (From: James Bucanek <email@hidden>)

  • Prev by Date: Best way to create string from an array of dictionaries?
  • Next by Date: Re: How to make a NSToolbarItem for view mode a la Finder?
  • Previous by thread: Re: Finder-like color label menu item in Cocoa?
  • Next by thread: Re: Finder-like color label menu item in Cocoa?
  • Index(es):
    • Date
    • Thread