• 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
validating menu items
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

validating menu items


  • Subject: validating menu items
  • From: April Gendill <email@hidden>
  • Date: Tue, 14 Oct 2003 20:39:32 -0700

I'm trying to validate menu items as follows

- (BOOL)validateMenuItem:(id <NSMenuItem>)theItem
{
SEL theAction = [theItem action];


* items to validate here *

it works just fine when [theItem action] points to something with in
the main controller class.
but if I try to point to something outside the class it does not work.

I'm using:
if(([theItem target] ==pointerToClassInQuestion) && someCondition){
return NO;
}


In interface builder I've connected the classes to one another and
calling any information passed back and forth works just fine. Only the
validateMenuItem function fails.


Any ideas?

April
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: validating menu items
      • From: Greg Titus <email@hidden>
  • Prev by Date: Re: Archiving objects in a database
  • Next by Date: Re: Grep wrapper (was Re: Some small utility for Mac OS X.) [OT]
  • Previous by thread: Re: Archiving objects in a database
  • Next by thread: Re: validating menu items
  • Index(es):
    • Date
    • Thread