• 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
Why get my constraints broken?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Why get my constraints broken?


  • Subject: Why get my constraints broken?
  • From: "Gerriet M. Denkmann" <email@hidden>
  • Date: Tue, 10 Apr 2012 18:16:32 +0700

I have a xib-file with an NSView (content view of a tab of an NSTabView) called TabTextView.
Inside this TabTextView I have an NSScrollView (containing an NSTextView) called ScrollText which:
- has a top vertical distance to it's superView (TabTextView) of 12
- has a height of 33 or more
- has a bottom vertical distance to it's superView (TabTextView) of 17.

Sounds quite reasonable to me.

But when I load this xib file I get some strange messages (hex addresses edited for readability):

... Unable to simultaneously satisfy constraints:
(
    "<NSLayoutConstraint:0X1 V:[ScrollText(>=33)]   (Names: ScrollText:0XB )>",
    "<NSLayoutConstraint:0X2 V:[ScrollText]-(17)-|   (Names: TabTextView:0XA, ScrollText:0XB, '|':NSView:0XA )>",
    "<NSLayoutConstraint:0X3 V:|-(12)-[ScrollText]   (Names: ScrollText:0XB, TabTextView:0XA, '|':NSView:0XA )>",
    "<NSAutoresizingMaskLayoutConstraint:0X4 h=--& v=--& V:[TabTextView(0)]   (Names: TabTextView:0XA )>"
)

Will attempt to recover by breaking constraint
<NSLayoutConstraint:0X1 V:[ScrollText(>=33)]   (Names: ScrollText:0XB )>

... Unable to simultaneously satisfy constraints:
(
    "<NSLayoutConstraint:0X2 V:[ScrollText]-(17)-|   (Names: TabTextView:0XA, ScrollText:0XB, '|':NSView:0XA )>",
    "<NSLayoutConstraint:0X3 V:|-(12)-[ScrollText]   (Names: ScrollText:0XB, TabTextView:0XA, '|':NSView:0XA )>",
    "<NSAutoresizingMaskLayoutConstraint:0X4 h=--& v=--& V:[TabTextView(0)]   (Names: TabTextView:0XA )>"
)

Will attempt to recover by breaking constraint
<NSLayoutConstraint:0X2 V:[ScrollText]-(17)-|   (Names: TabTextView:0XA, ScrollText:0XB, '|':NSView:0XA )>

What am I doing wrong?
I don't like these warnings, and I resent the breaking of my constraint V:[ScrollText(>=33)] which I put there for a good reason.


Kind regards

Gerriet.

P.S. 10.7.3, Xcode 4.3.2


_______________________________________________

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: Is UIWebView KVO compliant?
  • Next by Date: Recursive call-back block
  • Previous by thread: Re: Is UIWebView KVO compliant?
  • Next by thread: Recursive call-back block
  • Index(es):
    • Date
    • Thread