Re: Why are my toolbar items disabled?
Re: Why are my toolbar items disabled?
- Subject: Re: Why are my toolbar items disabled?
- From: John Lombardo <email@hidden>
- Date: Thu, 24 Jul 2003 01:35:44 +0800
Thanks Ronald and Alastair. I did some frustrated throw-some-code-around
stuff and that fixed the problem, but I'll definitely reference your emails
as check lists when I implement toolbars in my actual app - this was just a
test app to get the hang of toolbars.
Now something else peculiar has has happened. The initial toolbar items
were constructed using a for loop and given only the barest properties
necessary. Then after getting that working, I added the following statement:
[items setObject:NSToolbarSeparatorItemIdentifier forKey:@"separator"];
...which generates the following error when selecting "Customize Toolbar..."
from the toolbar's contextual menu:
-[NSCFString _setToolbar:]: selector not recognized
Given that the same thing happens when I try to add any of the NSToolbarItem
constants, I can only assume that there is sometime wrong with the way I am
trying to use them.
john
On 24/7/03 0:59, "Ronald Jaramillo" <email@hidden> wrote:
>
You can start by checking a couple of issues which I seam to always
>
forget:
>
- designate the toolbar delegate when you set up the toolbar
>
- Implement and return yes (when appropriate) to the "
>
validateToolbarItem: " method
>
- Control that the selector you assign to your ToolbarItem is spelled
>
the same way as the corresponding method:
>
[toolbarItem setAction: @selector(methodName:)]; == -
>
(IBAction)methodName:(id)sender;
>
>
/mvh
>
Ronald Jaramillo
>
>
On Wednesday, July 23, 2003, at 06:28 PM, John Lombardo wrote:
>
>
> Is anyone here aware of any circumstances under which all my toolbar
>
> items
>
> would be disabled? I've just created a dictionary of dummy
>
> NSToolbarItems,
>
> and whilst they all appear in the toolbar and customization palette,
>
> they
>
> become disabled the moment they are dropped into the toolbar.
>
>
>
>
>
> Anyone out there with more clues than me?
>
>
>
> Cheers,
>
> John
>
> _______________________________________________
>
> 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.
_______________________________________________
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.