Re: Programmatic autolayout problem

2013-02-25 Thread Kyle Sluder
On Feb 25, 2013, at 11:47 PM, Rick Mann wrote: > > On Feb 25, 2013, at 23:44 , Kyle Sluder wrote: > >> You'll never see the constraints created for content hugging or compression >> resistance. >> >> IB refuses to let your interface be underspecified. If you remove a >> constraint necessary

Re: Programmatic autolayout problem

2013-02-25 Thread Rick Mann
On Feb 25, 2013, at 23:44 , Kyle Sluder wrote: > You'll never see the constraints created for content hugging or compression > resistance. > > IB refuses to let your interface be underspecified. If you remove a > constraint necessary to fully specify your interface, it will tend to install >

Re: Programmatic autolayout problem

2013-02-25 Thread Kyle Sluder
On Feb 25, 2013, at 11:34 PM, Rick Mann wrote: > > On Feb 25, 2013, at 23:03 , Kyle Sluder wrote: > >> You must still have an underspecified system of constraints in the >> horizontal direction. Unfortunately, your description of your constraint >> system lacks sufficient detail for debugging,

Re: Programmatic autolayout problem

2013-02-25 Thread Rick Mann
On Feb 25, 2013, at 23:03 , Kyle Sluder wrote: > You must still have an underspecified system of constraints in the > horizontal direction. Unfortunately, your description of your constraint > system lacks sufficient detail for debugging, which is already difficult > to do in textual form. > >

Re: Programmatic autolayout problem

2013-02-25 Thread Rick Mann
On Feb 25, 2013, at 23:03 , Kyle Sluder wrote: > You must still have an underspecified system of constraints in the > horizontal direction. Unfortunately, your description of your constraint > system lacks sufficient detail for debugging, which is already difficult > to do in textual form. I li

Re: Programmatic autolayout problem

2013-02-25 Thread Kyle Sluder
On Mon, Feb 25, 2013, at 10:46 PM, Rick Mann wrote: > Well, it's closer to working, but still not correct. If I don't pre-size > the window, it never gets resized, even though all the constraints are > above 500. Vertically it seems to be perfectly hugging my labels > (verified by changing the font

Re: Programmatic autolayout problem

2013-02-25 Thread Rick Mann
On Feb 25, 2013, at 22:38 , Kyle Sluder wrote: > Yes for the hugging constraints. Otherwise the window size will win as > the user drags to resize the window. > > Think of window drag-resizing as installing a temporary constraint that > follows the mouse at priority 500. Think of content huggin

Re: Programmatic autolayout problem

2013-02-25 Thread Kyle Sluder
On Mon, Feb 25, 2013, at 10:04 PM, Rick Mann wrote: > IB defaults a lot of hugging/compression constraints to 250. Do I need to > increase those to 501 or more, as well? Yes for the hugging constraints. Otherwise the window size will win as the user drags to resize the window. Think of window dra

Re: Programmatic autolayout problem

2013-02-25 Thread Rick Mann
Thanks, Kyle! On Feb 25, 2013, at 21:55 , Kyle Sluder wrote: > Specifically, you are adding them to the window's content view, correct? I'll > assume so. Yes, that's correct. >> >> I programmatically build a view layout string that looks like this: >> >> |[view0][view1] > > This leaves t

Re: Programmatic autolayout problem

2013-02-25 Thread Kyle Sluder
On Feb 25, 2013, at 8:33 PM, Rick Mann wrote: > This is the first time I'm trying to programmatically use autolayout, and I > can't seem to do a simple thing. > > I'm creating a bunch of views using an NSViewController subclass for each, > and adding them to a window (the window created from t

Programmatic autolayout problem

2013-02-25 Thread Rick Mann
This is the first time I'm trying to programmatically use autolayout, and I can't seem to do a simple thing. I'm creating a bunch of views using an NSViewController subclass for each, and adding them to a window (the window created from the default Cocoa App template). I programmatically build