• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Issues with hiding NSTableColumns with autolayout
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Issues with hiding NSTableColumns with autolayout


  • Subject: Re: Issues with hiding NSTableColumns with autolayout
  • From: Ken Thomases <email@hidden>
  • Date: Thu, 02 Jul 2015 13:08:12 -0500

On Jul 2, 2015, at 12:25 PM, Jensen, Stephen C. (AFRC-R) <email@hidden> 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 (email@hidden)

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:

This email sent to email@hidden


  • Prev by Date: Re: Swift 2.0
  • Next by Date: Re: Problem having a framework working in one of my targets (a screensaver)
  • Previous by thread: Re: Swift 2.0
  • Next by thread: What is "TypeA -> TypeB"?
  • Index(es):
    • Date
    • Thread