Re: ambiguous layout for documentView in NSScrollView

2013-03-17 Thread Kyle Sluder
On Mar 17, 2013, at 9:37 AM, Kyle Sluder wrote: > > So that we're all on the same page: your internal vertical constraints can be > expressed as @"V:|[subview1(>=70)][subview2(>=70)]…|". Then you add a > constraint of @"|[documentView]|" to your scroll view. Follow-up: if your goal here is to

Re: ambiguous layout for documentView in NSScrollView

2013-03-17 Thread Kyle Sluder
To pin the height of the documentView to its NSScrollView, I use the following constraint: NSDictionary * scrollViewsDict = NSDictionaryOfVariableBindings(documentView); [scrollView addConstraints: [NSLayoutConstraint constraintsWithVisualFormat: @"V:|[d

Re: ambiguous layout for documentView in NSScrollView

2013-03-17 Thread iain
On Sun, Mar 17, 2013 at 1:50 AM, Kyle Sluder wrote: > On Sat, Mar 16, 2013, at 06:37 PM, iain wrote: > > > > > > On 17 Mar 2013, at 12:38 AM, Chuck Soper > > > Each subview has an "NSLayoutConstraint * widthConstraint;" ivar that > > > holds the absolute width. Visually, it looks like this: > >

Re: ambiguous layout for documentView in NSScrollView

2013-03-16 Thread Kyle Sluder
On Mar 16, 2013, at 8:57 PM, Chuck Soper wrote: > > Is persistent layout ambiguity (for the documentView only) necessarily a > problem? My UI works fine. I don't see how having the documentView > ambiguous is causing a problem. Yes, it's a problem. In my talk I reference a bug we had where, bec

Re: ambiguous layout for documentView in NSScrollView

2013-03-16 Thread Chuck Soper
On 3/16/13 6:59 PM, "Kyle Sluder" wrote: >On Sat, Mar 16, 2013, at 05:38 PM, Chuck Soper wrote: >> I thought I'd create a new thread because I'm not sure I need to take >> that >> general approach for my specific case. My user interface works fine. The >> problem is that my documentView is ambigu

Re: ambiguous layout for documentView in NSScrollView

2013-03-16 Thread Kyle Sluder
On Sat, Mar 16, 2013, at 05:38 PM, Chuck Soper wrote: > I thought I'd create a new thread because I'm not sure I need to take > that > general approach for my specific case. My user interface works fine. The > problem is that my documentView is ambiguous, but I think I can ignore > that fact for my

Re: ambiguous layout for documentView in NSScrollView

2013-03-16 Thread Kyle Sluder
On Sat, Mar 16, 2013, at 06:37 PM, iain wrote: > > > On 17 Mar 2013, at 12:38 AM, Chuck Soper > > Each subview has an "NSLayoutConstraint * widthConstraint;" ivar that > > holds the absolute width. Visually, it looks like this: > > @"H:[subview(==120)]" > > > > > > I also added some minimum w

Re: ambiguous layout for documentView in NSScrollView

2013-03-16 Thread iain
On 17 Mar 2013, at 12:38 AM, Chuck Soper > Each subview has an "NSLayoutConstraint * widthConstraint;" ivar that > holds the absolute width. Visually, it looks like this: > @"H:[subview(==120)]" > > > I also added some minimum width and height constraints that look like this: > @"H:[subview(>

ambiguous layout for documentView in NSScrollView

2013-03-16 Thread Chuck Soper
Thanks to Kyle Sluder's recent "Re: guidelines for using autolayout with NSScrollView?" post, I have a better understanding of what's involved in getting auto layout to work with NSScrollView. I thought I'd create a new thread because I'm not sure I need to take that general approach for my specif