Re: Toolbar Item Validation in a Panel
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