On Jul 2, 2015, at 12:25 PM, Jensen, Stephen C. (AFRC-R) 
<stephen.c.jen...@nasa.gov> wrote:
> 
> The problem occurs when the user hides an NSTableColumn… I start getting 
> errors. For example, when I hide the column with the identifier “orgCode”, I 
> get the following:
> 
> 2015-07-02 09:57:30.560 myApp[9975:303] Unable to simultaneously satisfy 
> constraints:
> (
>    "<NSLayoutConstraint:0x618000099320 'NSView-Encapsulated-Layout-Width' 
> H:[orgCode(0)]   (Names: orgCode:0x60800018bfc0 )>",
>    "<NSLayoutConstraint:0x60800028cdf0 H:[NSTextField:0x60800018c160]-(2)-|   
> (Names: orgCode:0x60800018bfc0, '|': orgCode:0x60800018bfc0 )>",
>    "<NSLayoutConstraint:0x60800028cee0 H:|-(2)-[NSTextField:0x60800018c160]   
> (Names: orgCode:0x60800018bfc0, '|': orgCode:0x60800018bfc0 )>"
> )

> My first inclination was to delete the constraints, but then the NSTextViews 
> within the table don’t change size with the column… that doesn’t work. 
> Deleting and recreating constraints whenever I hide or show a column also 
> seems to be way too complicated… 

You can set one of the constraints relating the text field to its superview to 
have non-required priority.  For example, set the trailing constraint to 
priority 990.  This will allow it be broken (without complaint) if there's 
absolutely no other recourse, but will maintain it otherwise.

Regards,
Ken


_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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 arch...@mail-archive.com

Reply via email to