• 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: Why are my toolbar items disabled?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

References: 
 >Re: Why are my toolbar items disabled? (From: Ronald Jaramillo <email@hidden>)

  • Prev by Date: Re: Can a subclass of NSDictionary do this?
  • Next by Date: Re: NSImage to PICT (corrected)
  • Previous by thread: Re: Why are my toolbar items disabled?
  • Next by thread: Re: Why are my toolbar items disabled?
  • Index(es):
    • Date
    • Thread