Re: Gap above NSMenuItem custom view
Re: Gap above NSMenuItem custom view
- Subject: Re: Gap above NSMenuItem custom view
- From: Joshua Garnham <email@hidden>
- Date: Mon, 27 Dec 2010 17:17:40 +0000 (GMT)
Okay, you win. I will go ahead and use a borderless window. I know how to make a
window borderless but where should I start then? How would you suggest I deal
with adding and remove items from this sudo menu. Should I use NSTableView?
________________________________
From: Kyle Sluder <email@hidden>
To: Joshua Garnham <email@hidden>
Cc: email@hidden
Sent: Sun, 26 December, 2010 22:04:22
Subject: Re: Gap above NSMenuItem custom view
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
>m
>
> 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