Re: NSToolbarItem Action Not Passed to NSButton...
Re: NSToolbarItem Action Not Passed to NSButton...
- Subject: Re: NSToolbarItem Action Not Passed to NSButton...
- From: "Peters, Brandon" <email@hidden>
- Date: Fri, 25 Apr 2014 03:15:42 +0000
- Thread-topic: NSToolbarItem Action Not Passed to NSButton...
Andy,
My button is inside the customer toolbar item, if I make the button an outlet, how will I connect to it in IB?
On Apr 24, 2014, at 10:55 PM, Andy Lee <email@hidden> wrote:
> Try setting the target/action on the button rather than the toolbar item.
>
> --Andy
>
> On Apr 24, 2014, at 10:47 PM, "Peters, Brandon" <email@hidden> wrote:
>
>> Andy,
>>
>> I get the name of the custom NSToolbarItem, which I should get.
>>
>> On Apr 24, 2014, at 10:41 PM, Andy Lee <email@hidden> wrote:
>>
>>> On Apr 24, 2014, at 10:23 PM, "Peters, Brandon" <email@hidden> wrote:
>>>> Yesterday, I got the view for the NSToolbarItem to show the desired image by putting the set image code for the button in the toolbar item’s validate() method, then setting the toolbar item’s view to the button in that method. However, now when I click the toolbar item in the app, the action does not get called even though I used IB to set the action. If I put the code back in the init() method, the default button shows and not what I want, but the action gets called.
>>>
>>> In your init method, if you use NSLog to print self.toolbarItem, what do you get?
>>>
>>> --Andy
>>>
>>
>
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden