Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

KPForMacRum

macrumors newbie
Original poster
Sep 30, 2008
7
0
I am new to Mac and Cocoa programming. So please excuse me. I created a Document application, and see that all menu items under File, Edit etc are disabled. I connected, in MainMenu.nib, them to FirstResponder, and see that they are all connected properly.

The application menu, which has preferences.. Hide.. etc are also disabled.

Am I missing something? When I run the application, why are they not enabled? I even tried:

- (BOOL)validateMenuItem:(NSMenuItem *)item
return YES;
}

and put a break point, but it seems to not even go there. Please help.

Thank you.
KP
 

HiRez

macrumors 603
Jan 6, 2004
6,265
2,630
Western US
If you created a Cocoa Document-based application, you shouldn't need to connect most of the default menu items; they are already connected to your document class, and most of them automatically enable or disable themselves based on the document's state. You may have actually broken that connection by trying to connect them to something else.
 

KPForMacRum

macrumors newbie
Original poster
Sep 30, 2008
7
0
Thank you HiRez, very much. That was it. I had those connected in MyDocument as well. They are at a single place, and are working.
Thank you again.
KP
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.