• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: _openRecentDocument undocumented?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >_openRecentDocument undocumented? (From: "Theodore H. Smith" <email@hidden>)
 >Re: _openRecentDocument undocumented? (From: Fritz Anderson <email@hidden>)

  • Prev by Date: Re: Initializing views with models
  • Next by Date: EXS file format documentation?
  • Previous by thread: Re: _openRecentDocument undocumented?
  • Next by thread: Newbie networking troubles...
  • Index(es):
    • Date
    • Thread