On Aug 3, 2014, at 11:11 AM, Daryle Walker <[email protected]> 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 protected])

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to