Re: _openRecentDocument undocumented?
Re: _openRecentDocument undocumented?
- Subject: Re: _openRecentDocument undocumented?
- From: "Theodore H. Smith" <email@hidden>
- Date: Tue, 26 Jul 2005 22:15:43 +0100
On 26 Jul 2005, at 18:22, Fritz Anderson wrote:
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].
Well that would explain it. Thanks!
--
http://elfdata.com/plugin/ Industrial strength string processing,
made easy.
"All things are logical. Putting free-will in the slot for premises in
a logical system, makes all of life both understandable, and free."
_______________________________________________
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