Re: Gap above NSMenuItem custom view
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