
BWanchoredButtonBar does not forward some NSSplitViewDelegate methods
Reported by Florent Pillet | October 17th, 2010 @ 12:40 PM
Since BWAnchoredButtonBar sets itself as the delegate of BWSplitView, it should properly forward all delegate methods to its splitViewDelegate. It currently does not forward:
- splitView:shouldAdjustSizeOfSubview:
- splitViewWillResizeSubviews:
- splitViewDidResizeSubviews:
Comments and changes to this ticket
-
Florent Pillet October 17th, 2010 @ 01:05 PM
Here's the patch:
diff -r 590c12e68e7a BWAnchoredButtonBar.m
--- a/BWAnchoredButtonBar.m Wed Jan 20 10:00:27 2010 -0800 +++ b/BWAnchoredButtonBar.m Sun Oct 17 19:04:49 2010 +0200 @@ -406,4 +406,23 @@return NO;
}
+- (BOOL)splitView:(NSSplitView )splitView shouldAdjustSizeOfSubview:(NSView )subview +{ + if ([splitViewDelegate respondsToSelector:cmd]) + return [splitViewDelegate splitView:splitView shouldAdjustSizeOfSubview:subview]; + return YES; +} + +- (void)splitViewWillResizeSubviews:(NSNotification *)aNotification +{ + if ([splitViewDelegate respondsToSelector:cmd]) + [splitViewDelegate splitViewWillResizeSubviews:aNotification]; +} + +- (void)splitViewDidResizeSubviews:(NSNotification *)aNotification +{ + if ([splitViewDelegate respondsToSelector:_cmd]) + [splitViewDelegate splitViewDidResizeSubviews:aNotification]; +} + @end diff -r 590c12e68e7a BWSplitView.m
--- a/BWSplitView.m Wed Jan 20 10:00:27 2010 -0800 +++ b/BWSplitView.m Sun Oct 17 19:04:49 2010 +0200 @@ -715,6 +715,13 @@[secondaryDelegate splitViewWillResizeSubviews:aNotification];
}
+- (BOOL)splitView:(NSSplitView )splitView shouldAdjustSizeOfSubview:(NSView )subview +{ + if ([secondaryDelegate respondsToSelector:_cmd]) + return [secondaryDelegate splitView:splitView shouldAdjustSizeOfSubview:subview]; + return YES; +} + #pragma mark - Resize Subviews Delegate Method and Helper Methods
- (int)resizableSubviews
-
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป
BWToolkit is an Interface Builder plugin that contains commonly used UI elements and other objects designed to simplify Mac development.