Re: _openRecentDocument undocumented?
Re: _openRecentDocument undocumented?
- Subject: Re: _openRecentDocument undocumented?
- From: Fritz Anderson <email@hidden>
- Date: Tue, 26 Jul 2005 12:22:14 -0500
On 25 Jul 2005, at 2:55 PM, Theodore H. Smith wrote:
My validateMenuItem worked something like this:
SEL s = [MyMenuItem action];
if (s == @selector(sel1:) and [self Test1]) {
return true;
} else if (s == @selector(sel2:) and [self Test2) {
return true;
} else if (s = @selector(aMenuThatShouldAlwaysBeEnabled) {
return true;
}
return false;
Now, I "fixed" that by checking for the selector
"_openRecentDocument:", but that doesn't quite seem right to me :o)
So perhaps I'm using the wrong fix.
_openRecentDocument: is a method of your superclass, isn't it? Then
it makes sense that your superclass recognizes and validates that item.
Don't turn off every menu item you don't know about. Return [super
validateMenuItem: aMenuItem].
-- F
_______________________________________________
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