• 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: Toolbar Item Validation in a Panel
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Toolbar Item Validation in a Panel


  • Subject: Re: Toolbar Item Validation in a Panel
  • From: "R. Scott Thompson" <email@hidden>
  • Date: Fri, 22 Oct 2004 11:01:23 -0500


On Oct 21, 2004, at 4:44 PM, Amar Sagoo wrote:

I just had a play with my code and discovered that the standard colour toolbar item doesn't seem to have a target, so we're probably on the wrong track here.

Also, my validateToolbarItem: method gets called quite frequently as the mouse moves over the toolbar, so the fact that yours doesn't get called at all seems to imply that it's a more basic problem.

Can you put an NSLog([[[myToolbar delegate] class] description]) somewhere?

Well, that code simply returns:

2004-10-22 10:53:03.392 LSEditor[1110] QuestionWizardCtlr

(where QuestionWizardCtlr is the class of the object which I am setting as the delegate).

QuestionWizardCtlr, in turn, implements the method:

/* ----------------------------------------------------- validateToolbarItem: */
- (BOOL) validateToolbarItem: (NSToolbarItem *)theItem
{
BOOL retVal = false;
if(theItem) {
retVal = true;
}

return retVal;
}


But as I've said, this routine is never called :-(

Now that I think about it, I wonder if the routine is not called because nobody in the first responder chain responds to the actions that the toolbar item sends... Hmmmmm....

Scott
_______________________________________________
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
  • Follow-Ups:
    • Re: Toolbar Item Validation in a Panel
      • From: "R. Scott Thompson" <email@hidden>
References: 
 >Toolbar Item Validation in a Panel (From: "R. Scott Thompson" <email@hidden>)
 >Re: Toolbar Item Validation in a Panel (From: Amar Sagoo <email@hidden>)
 >Re: Toolbar Item Validation in a Panel (From: "R. Scott Thompson" <email@hidden>)
 >Re: Toolbar Item Validation in a Panel (From: Amar Sagoo <email@hidden>)
 >Re: Toolbar Item Validation in a Panel (From: "R. Scott Thompson" <email@hidden>)
 >Re: Toolbar Item Validation in a Panel (From: Amar Sagoo <email@hidden>)

  • Prev by Date: Re: Retains and bindings
  • Next by Date: Re: Copy and release
  • Previous by thread: Re: Toolbar Item Validation in a Panel
  • Next by thread: Re: Toolbar Item Validation in a Panel
  • Index(es):
    • Date
    • Thread