Enabling menu items?
Enabling menu items?
- Subject: Enabling menu items?
- From: Kai-Mikael Jää-Aro <email@hidden>
- Date: Wed, 25 Jul 2007 10:47:10 +0200
Clearly I'm making some trivial mistake, but I can't locate it by
myself and thus ask for your ever-useful help:
I have a Cocoa application which has an Edit menu containing Cut,
Copy and Paste items. These are in Interface Builder connected to
cut: copy: and paste: methods in FirstResponder, respectively. The
application window has its outlet initialFirstResponder connected to
EditorView, which is a subclass of NSView located inside the window.
EditorView implements
-(BOOL) accceptsFirstResponder {
return(YES);
}
and
- (BOOL)validateUserInterfaceItem:(id <NSValidatedUserInterfaceItem>)
anItem {
return(YES);
}
It also declares and implements
-(IBAction) cut: (id) sender;
-(IBAction) copy: (id) sender;
-(IBAction) paste: (id) sender;
But, in spite of all this, all items in the Edit menu are disabled
when running the program. What have I forgotten to add to this?
_______________________________________________
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