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

Re: validating menu items


  • Subject: Re: validating menu items
  • From: Greg Titus <email@hidden>
  • Date: Tue, 14 Oct 2003 21:01:19 -0700

On Tuesday, October 14, 2003, at 08:39 PM, April Gendill wrote:
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.

Hi April,

The -validateMenuItem: method is called only on the target of the menu item, so it will be called on the main controller class only for those items which target the main controller class. You need to add other -validateMenuItem: implementations to the other classes that are targets of menu items in order to validate them.

Hope this helps,
- Greg
_______________________________________________
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: April Gendill <email@hidden>
References: 
 >validating menu items (From: April Gendill <email@hidden>)

  • Prev by Date: Re: Grep wrapper (was Re: Some small utility for Mac OS X.) [OT]
  • Next by Date: Re: validating menu items
  • Previous by thread: validating menu items
  • Next by thread: Re: validating menu items
  • Index(es):
    • Date
    • Thread