On Wed, May 13, 2009 at 4:20 PM, Chris Paveglio
<chris_paveg...@yahoo.com> 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 (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to