• 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: FW: Enabling and Disabling menus
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: FW: Enabling and Disabling menus


  • Subject: RE: FW: Enabling and Disabling menus
  • From: "Stuppel, Searle @ San Diego Central" <email@hidden>
  • Date: Wed, 22 Aug 2001 13:21:21 -0700

So basically as i understand it:

1. Don't use my method becuase it is as sloppy as i imagined it to be (even
though it is effective)
2. Everytime it triggers a action call, it checks the menus. Then based on
which action was called, it checks the appropriate looping structure within
the - (BOOL)validateMenuItem:(NSMenuItem*)menuItem.
3. I should probably declare a BOOL variable that corresponds to each of the
menu items i want to enable disable, and then set them accordingly so that
when an action is called, it does the right thing.

- (BOOL)validateMenuItem:(NSMenuItem*)menuItem
{
SEL action = [menuItem action];
if (action == @selector(doSomething:)) {
if (menu1test == TRUE )
{return TRUE;}
else {return FALSE);
} else if (action == ........)
....
} .....
return [menuItem isEnabled];
}

4. Now how do i reset it again at the end of an action? As far as I can see,
this calls at the START of an action. Does it trigger AGAIN at the end? This
is really important for me to know.

Thanks for the help

searle

PS> Exactly why does setAutoenablesItems not work like it is specified to?

Searle Stuppel
CB Richard Ellis, Inc.
Direct: 858-546-4600
Fax: 858-546-4616
Toll Free: 800-334-9347
email@hidden


-----Original Message-----

  • Prev by Date: Re: A couple questions
  • Next by Date: Re: Can I make an array of strings into one long string?
  • Previous by thread: Re: FW: Enabling and Disabling menus
  • Next by thread: Re: FW: Enabling and Disabling menus
  • Index(es):
    • Date
    • Thread