• 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: Gap above NSMenuItem custom view
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Gap above NSMenuItem custom view


  • Subject: Re: Gap above NSMenuItem custom view
  • From: Kyle Sluder <email@hidden>
  • Date: Sun, 26 Dec 2010 17:04:22 -0500

On Sun, Dec 26, 2010 at 4:16 PM, Joshua Garnham
<email@hidden> wrote:
>
> I see your point but I just found this post on Stack Overflow detailing how someone else has done it.
>
> http://stackoverflow.com/questions/4064386/reverse-engineering-an-nsmenu-for-a-status-bar-item
>
> However I am having dificulty compiling the code as I get EXC_BAD_ACCESS on the line where the event handler is installed. Can you shed any light on the code in that question?

1. Your question has nothing to do with compiling code. EXC_BAD_ACCESS
is a runtime exception caused by a bad pointer dereference.
2. Nobody can debug anything like this without your exact source code
and a stack trace leading up to the exception, at a bare minimum.
3. The code you posted relies on private API.
4. None of this will work on 64-bit Mac OS X.

So the answer is to stop beating this dead horse and do it the right
way. File a bug asking for support for this in NSMenu in a future
version of OS X if you like, but in the meantime your one, single,
solitary, only option is to forsake NSMenu and use a borderless
NSWindow.

--Kyle Sluder
_______________________________________________

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: Gap above NSMenuItem custom view
      • From: Joshua Garnham <email@hidden>
References: 
 >Re: Gap above NSMenuItem custom view (From: Joshua Garnham <email@hidden>)

  • Prev by Date: Re: Gap above NSMenuItem custom view
  • Next by Date: Re: Strange error solved by turning off "Non-contiguous Layout"
  • Previous by thread: Re: Gap above NSMenuItem custom view
  • Next by thread: Re: Gap above NSMenuItem custom view
  • Index(es):
    • Date
    • Thread