Re: Menu item and state
Re: Menu item and state
- Subject: Re: Menu item and state
- From: Kyle Sluder <email@hidden>
- Date: Wed, 13 May 2009 16:34:41 -0400
On Wed, May 13, 2009 at 4:20 PM, Chris Paveglio
<email@hidden> wrote:
> I am trying to get the state of a menu item, whether it is checked or not. In my class, I wrote the very simple code to get the state of the menu item, and switch it to the other state when selected. All is OK with that.
Stop here. You should not need to ask the menu item for its state.
Rather, the menu item's action should be changing a value in your
model or controller, and you should be using *that* value to make
decisions elsewhere. MVC at work.
> In another function (in the same class) that is called from my main class, I can't get the state of the menu item. The .h file is imported into the main class, and all the code works except it just doesn't want to recognize the state.
Classes don't call anything. They don't import anything (nor is
anything imported into them).
I'd suggest reviewing some of the fundamental documentation.
--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