• 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: Rosyna <email@hidden>
  • Date: Mon, 24 Jul 2006 01:17:06 -0700

You'd want to create a cocoa menu item in a cocoa menu, then replace the view for that menu item with a HIView. Remember, Carbon menu items are 1-based, Cocoa Menu items are 0-based.

Ack, at 7/23/06, James Bucanek said:

 >extern MenuRef _NSGetCarbonMenu( NSMenu *menu);

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.

--


Sincerely, Rosyna Keller Technical Support/Holy Knight/Always needs a hug

Unsanity: Unsane Tools for Insanely Great People

It's either this, or imagining Phil Schiller in a thong.
_______________________________________________
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: 
 >Re: Finder-like color label menu item in Cocoa? (From: James Bucanek <email@hidden>)

  • Prev by Date: Re: writing huge C-array to a file
  • Next by Date: Re: [NSAttributedString attributedStringByTrimming....
  • 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