Re: Finder-like color label menu item in Cocoa?
Re: Finder-like color label menu item in Cocoa?
- Subject: Re: Finder-like color label menu item in Cocoa?
- From: James Bucanek <email@hidden>
- Date: Mon, 24 Jul 2006 17:55:25 -0700
Seth Willits wrote on Monday, July 24, 2006:
>On Jul 24, 2006, at 9:09 AM, James Bucanek wrote:
>
>>> yes because the right function to call is now (d
>>> extern MenuRef _NSGetCarbonMenu2(id);
>>
>> Yea, success!
>>
>> OK, for anyone else who is interested in this, I've posted the
>> modified version of LabelItemView.cp (now LabelItemView.mm) at
>> <ftp://ftp.twilightandbarking.com/Public/Software/Cocoa/
>> LabelItemView.zip>
>
>I just get a sigbart when debugging and I can't link it when building
>a release version. 10.4.7.
You're probably missing something. ;)
I encounted a bus error when the required .png files weren't in the bundle (not much error checking in that code). It's pretty easy to spot in the debugger.
The undefined symbols should tell you what you need to link against.
And there are lots of other minor problems. It turns out that inserting the HIView menu in the middle of an existing NSMenu messes up NSMenu's indexes, so that all of the menu items that follow doesn't work correctly. So right now, I'm making sure that the Labels item in the last one in the menu.
I played around with creating a dummy NSMenuItem then trying to replace it with the Carbon one. But when I do that the Carbon menu item never gets a call to ControlHit, so it never fires its action. I have no idea why.
--
James Bucanek
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden