• 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: Change a NSMenu's shape?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Change a NSMenu's shape?


  • Subject: Re: Change a NSMenu's shape?
  • From: Peter Maurer <email@hidden>
  • Date: Mon, 12 Nov 2007 23:15:36 +0100

Hey Peter and Ken,

thanks for taking the time to respond.

Can you use -[NSStatusItem setMenu:]?  If not, could you please file a
bug describing why?

Unfortunately, I can't. These are status items that also serve as drag & drop targets and one-click action triggers, depending on their context. In fact, my application's needs are so special that even this strategy ...


You may use -[NSStatusItem popUpStatusItemMenu:] to pop up an arbitrary menu with the correct appearance for a main menu (the sharp top corners).

... doesn't really work out, because this application pops up its NSStatusItem menus via PopUpMenuSelect() after getting their MenRefs by means of the undocumented _NSGetCarbonMenu() function. So filing a bug is kind of pointless, I guess. And I know that every time I use undocumented calls a little kitten dies, but it was the only way to achieve certain things (e.g., populate NSMenus while traversing them in order to browse your file system from a NSStatusItem) back in the Mac OS X 10.2 days.


Right now, I am actually rewriting these parts of my application to use -[NSStatusItem popUpStatusItemMenu:] in a new version that won't have to support 10.2 anymore; but that will take some more time, and in the mean time, I had hoped there would be a quick and dirty way to fix this cosmetic issues for Leopard users. However, if there isn't, I can live with that, too. Turns out it doesn't look quite as ridiculous if I simply move my menus 4 units to the left when running on Leopard.

BTW: I've always fantasized about being able to use the proper Dock context menu style (the one that "points" to a Dock icon), instead of having to ape it. But since we can't even change the corners' appearance, I guess that's out of the question completely. ;-)

Thanks again!

Peter.
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please 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: Change a NSMenu's shape?
      • From: John Stiles <email@hidden>
References: 
 >Change a NSMenu's shape? (From: Peter Maurer <email@hidden>)
 >Re: Change a NSMenu's shape? (From: "Ken Ferry" <email@hidden>)
 >Re: Change a NSMenu's shape? (From: Peter Ammon <email@hidden>)

  • Prev by Date: Re: drawing an array of pixels to the screen
  • Next by Date: Licensing my Application
  • Previous by thread: Re: Change a NSMenu's shape?
  • Next by thread: Re: Change a NSMenu's shape?
  • Index(es):
    • Date
    • Thread