Re: Need help with initializing Menu check boxes
Re: Need help with initializing Menu check boxes
- Subject: Re: Need help with initializing Menu check boxes
- From: "M. Uli Kusterer" <email@hidden>
- Date: Sat, 4 Dec 2004 08:06:50 +0100
At 22:56 Uhr -0500 02.12.2004, Michael Heinz wrote:
While I've figured out how to set/clear the check box on a menu item
when that item is selected, I can't figure out how to initialize the
check boxes when the document loads.
I presume by "check box on a menu item" you mean the check mark
character to the left of the menu item, right? Just to make sure
we're on the same page here.
Actually, I'd like to have those check boxes get updated whenever
the active document changes (because different documents can have
different settings).
Any suggestions on how to do this?
All the solutions I've seen offered so far will get the job done,
but I think what you really want is -(BOOL) validateMenuItem:
(id<NSMenuItem>)item; Provide that message e.g. in your window
delegate. It will be called whenever your menu opens, and you can
check whether item is one of your checkmarked menu items and use
setState: on "item" to make it conform to whatever member variable
you keep the state in.
This has the advantage that it's always current.
--
Cheers,
M. Uli Kusterer
------------------------------------------------------------
"The Witnesses of TeachText are everywhere..."
http://www.zathras.de
_______________________________________________
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