• 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: How do I get access to the control within a NSToolbarItem?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How do I get access to the control within a NSToolbarItem?


  • Subject: Re: How do I get access to the control within a NSToolbarItem?
  • From: Kyle Sluder <email@hidden>
  • Date: Sun, 03 Aug 2014 11:19:27 -0700

On Aug 3, 2014, at 11:11 AM, Daryle Walker <email@hidden> wrote:
>
> I’m adding a combined Back/Forward toolbar button to my web browser project.  I was going to enable/disable each button half like:
>
> - (void)webView:(WebView *)sender didFinishLoadForFrame:(WebFrame *)frame
> {
>    // Ignore notices from sub-frames
>    if ((self.webView == sender) && (frame == [sender mainFrame])) {
>        [self.toolbarBackForward setEnabled:[sender canGoBack] forSegment:kPrGoBackSegment];
>        [self.toolbarBackForward setEnabled:[sender canGoForward] forSegment:kPrGoForwardSegment];
>    }
> }
>
> But I was getting problems with the method signatures being unrecognized.  Then I realized that the control I dragged from the XIB to the header file was a NSToolbarItem*, not the NSSegmentedControl* I was expecting.  How do I get to that inner control?  (Hopefully without wasting time making a subclass.)

The `view` property of NSToolbarItem is pretty clearly documented.

--Kyle Sluder
_______________________________________________

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


  • Follow-Ups:
    • Re: How do I get access to the control within a NSToolbarItem?
      • From: Daryle Walker <email@hidden>
References: 
 >How do I get access to the control within a NSToolbarItem? (From: Daryle Walker <email@hidden>)

  • Prev by Date: How do I get access to the control within a NSToolbarItem?
  • Next by Date: Re: How do I get access to the control within a NSToolbarItem?
  • Previous by thread: How do I get access to the control within a NSToolbarItem?
  • Next by thread: Re: How do I get access to the control within a NSToolbarItem?
  • Index(es):
    • Date
    • Thread