2

I am trying to remove an item from a selected index using,

[toolbar removeItemAtIndex:9];

This gives me this

Unable to simultaneously satisfy constraints:
(
    "<NSAutoresizingMaskLayoutConstraint:0x600000287f30 h=--& v=--& V:[NSToolbarItemViewer:0x10040b290(5)]>",
    "<NSAutoresizingMaskLayoutConstraint:0x600000287d00 h=--& v=-&- V:|-(10)-[_NSToolbarSpace:0x60000015b280]   (Names: '|':NSToolbarItemViewer:0x10040b290 )>",
    "<NSAutoresizingMaskLayoutConstraint:0x600000287cb0 h=--& v=-&- V:[_NSToolbarSpace:0x60000015b280]-(11)-|   (Names: '|':NSToolbarItemViewer:0x10040b290 )>"
)

Will attempt to recover by breaking constraint 
<NSAutoresizingMaskLayoutConstraint:0x600000287d00 h=--& v=-&- V:|-(10)-[_NSToolbarSpace:0x60000015b280]   (Names: '|':NSToolbarItemViewer:0x10040b290 )>

Set the NSUserDefault NSConstraintBasedLayoutVisualizeMutuallyExclusiveConstraints to YES to have -[NSWindow visualizeConstraints:] automatically called when this happens.  And/or, break on objc_exception_throw to catch this in the debugger.
2013-12-11 17:50:00.399 13+ Maths[1123:303] Unable to simultaneously satisfy constraints:
(
    "<NSAutoresizingMaskLayoutConstraint:0x600000288d90 h=--& v=--& V:[NSToolbarItemViewer:0x10040bc10(5)]>",
    "<NSAutoresizingMaskLayoutConstraint:0x600000288b60 h=--& v=-&- V:|-(10)-[_NSToolbarSpace:0x60000015b330]   (Names: '|':NSToolbarItemViewer:0x10040bc10 )>",
    "<NSAutoresizingMaskLayoutConstraint:0x600000288b10 h=--& v=-&- V:[_NSToolbarSpace:0x60000015b330]-(11)-|   (Names: '|':NSToolbarItemViewer:0x10040bc10 )>"
)

Will attempt to recover by breaking constraint 
<NSAutoresizingMaskLayoutConstraint:0x600000288b60 h=--& v=-&- V:|-(10)-[_NSToolbarSpace:0x60000015b330]   (Names: '|':NSToolbarItemViewer:0x10040bc10 )>

Set the NSUserDefault NSConstraintBasedLayoutVisualizeMutuallyExclusiveConstraints to YES to have -[NSWindow visualizeConstraints:] automatically called when this happens.  And/or, break on objc_exception_throw to catch this in the debugger.
2013-12-11 17:50:00.400 13+ Maths[1123:303] Unable to simultaneously satisfy constraints:
(
    "<NSAutoresizingMaskLayoutConstraint:0x600000289bf0 h=--& v=--& V:[NSToolbarItemViewer:0x10040c590(5)]>",
    "<NSAutoresizingMaskLayoutConstraint:0x6000002899c0 h=--& v=-&- V:|-(10)-[_NSToolbarSpace:0x60000015b3e0]   (Names: '|':NSToolbarItemViewer:0x10040c590 )>",
    "<NSAutoresizingMaskLayoutConstraint:0x600000289970 h=--& v=-&- V:[_NSToolbarSpace:0x60000015b3e0]-(11)-|   (Names: '|':NSToolbarItemViewer:0x10040c590 )>"
)

Will attempt to recover by breaking constraint 
<NSAutoresizingMaskLayoutConstraint:0x6000002899c0 h=--& v=-&- V:|-(10)-[_NSToolbarSpace:0x60000015b3e0]   (Names: '|':NSToolbarItemViewer:0x10040c590 )>

Set the NSUserDefault NSConstraintBasedLayoutVisualizeMutuallyExclusiveConstraints to YES to have -[NSWindow visualizeConstraints:] automatically called when this happens.  And/or, break on objc_exception_throw to catch this in the debugger.

Are the basic constraints broken using this removeItemAtIndex? Or is there any other way of removing items without breaking constraints.

Thanks.

Jay
  • 6,572
  • 3
  • 37
  • 65
Xander
  • 902
  • 2
  • 14
  • 33
  • OS Version..? Toolbars + Autolayout seems to be buggy pre-10.9 in my experience.. – Jay Oct 11 '14 at 14:36

0 Answers0