Re: does NSMenuItem setMixedStateImage or setOnStateImage work?
Re: does NSMenuItem setMixedStateImage or setOnStateImage work?
- Subject: Re: does NSMenuItem setMixedStateImage or setOnStateImage work?
- From: Kurt Bigler <email@hidden>
- Date: Wed, 18 Jan 2006 23:43:05 -0800
on 9/13/05 1:06 PM, Ken Victor <email@hidden> wrote:
> does NSMenuItem setMixedStateImage or setOnStateImage work? i know i
> have a valid NSImage that i pass to these commans as the same image
> works fine if passed to NSMenuItem setImage (which is how i've worked
> around this for the time being). however, if i set the on or mixed
> state image and then set the state, i still get the check mark or the
> dash instead of my image.
>
> i'm simply doing:
> [myMenuItem setMixedStateImage: myImage];
> [myMenuItem setState: NSMixedState];
>
> am i doing something wrong? or is this a known bug?
Hi,
Did you resolve this? I did not see any replies.
Meanwhile I am having similar problems and I see there have been posts about
related problems as far back as 2002.
So far I haven't found any responses from anyone at Apple. It would be
great if someone at Apple could put this question to rest.
Incidentally the setImage method works, but this does not put the image in
the "check mark" column, but rather in a column to the right of it, inset
into what is normally the text area. Trying setImage was useful in terms of
confirming that there was nothing wrong with the NSImage being passed to one
of the setXXXImage methods.
The following old message from another list brings up some other points:
> Subject: NSMenuItem set(On/Off/Mixed)StateImage:
> From: mike at lorax.com (Mike Ferris)
> Date: Sun Dec 29 11:41:36 2002
> In-reply-to: <email@hidden>
>
> I just noticed yesterday that the MenuMadness example is broken when it
> tries to set the bullet image to be used for the n state of a group of
> radio-style menu items... the items still just use checkmarks. I
> submitted a bug about it. I know these APIs worked prior to Cocoa
> starting to use the Carbon MenuManager. I am not sure whether they
> have ever worked after that switch.
>
> But they are meant to work as you would expect...
I also confirmed the problem in the MenuMadness example. I also tried using
setImage there and setImage also works where setOnStateImage does not (and
you get a check mark which pretty much confirms either the ON state or that
something else is very wrong).
The question this brings up for me: if it's true that Cocoa menus are a
layer on top of Carbon menus, then is there a way to bridge into carbon in
order to get some other menu item mark (character) alternatives to work
around this (apparent) Cocoa bug?
All testing I did was on 10.4.2.
Thanks for any information.
-Kurt Bigler
_______________________________________________
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