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

Re: NSMenu and NSMenuView


  • Subject: Re: NSMenu and NSMenuView
  • From: David Litwin <email@hidden>
  • Date: Wed, 7 Aug 2002 10:34:34 -0700

Unfortunately I never received any formal answer on this (although a few people helped out a bit privately). After working on some other code for awhile I've recently returned to this issue and here was my resolution:

The first set of docs describing the high level "how menus work" are just plain wrong, and it is sad that they waste people's time.

With no other explanation of a replacement, the only other menu customization functionality is in Carbon.
In a similar set of confusing docs, don't get stuck going down the road of making an MDEF code resource. The newer Carbon APIs support direct callbacks through the CreateCustomMenu() call. Search for CarbonMDEF in the sample code for a starting point.

The process of tracking this info down and being led on multiple dead ends has been a big waste of time and I'd hate for others to suffer the same fate. Hopefully one day the docs will be cleaned up enough to at least not actively mislead people.

David Litwin
Senior Software Engineer
Connectix

On Tuesday, June 11, 2002, at 01:56 PM, David Litwin wrote:

Hello, I'm looking to have a custom look for some menus and menu items. I'm guessing this involves subclassing and overriding a draw method somewhere, but this is where I need info.

All of my searching through the Apple documentation and discussion lists seems to point to two mutually exclusive descriptions of how NSMenus work:

One set describes how an NSMenu works with an NSMenuView (http://developer.apple.com/techpubs/macosx/Cocoa/TasksAndConcepts/ProgrammingTopics/
MenuList/index.html#//apple_ref/doc/uid/10000032i), and the other says that NSMenuView is no longer used (http://developer.apple.com/techpubs/macosx/Cocoa/Reference/ApplicationKit/
ObjC_classic/Classes/NSMenuView.html)

My searches of discussion lists also reference NSMenuView as a class working with NSMenu, and separately that it is no longer used for drawing.

Anyone know which is accurate? The references mentioning NSMenuView's deprecation don't give any information about how things actually work without it with regard to drawing, and I can't find any drawing related methods to override in NSMenu.

Thanks,

David Litwin
Senior Software Engineer
Connectix
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Prev by Date: Trouble resizing a scrollview programatically
  • Next by Date: Re: NSMenuItem setImage:
  • Previous by thread: Trouble resizing a scrollview programatically
  • Next by thread: Re: NSMenuItem setImage:
  • Index(es):
    • Date
    • Thread