Re: Bothersome "NSView-Encapsulated-Layout-Height" constraint?
On Aug 30, 2018, at 9:23 PM, Quincey Morris wrote: > “Encapsulated layout height” sounds like one of the constraints that IB adds > to your layout when it’s under-constrained at design time. Are you adding the > other constraints at run time? I’m not adding any constraints at run time. IB isn’t reporting anything as under-constrained. I tried to add a height constraint to the NSTableCellView, but that constraint is greyed out (and I found would have conflicted with the NSView-Encapsulated-Layout-Height anyway). Thanks, Demitri ___ 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
Re: Bothersome "NSView-Encapsulated-Layout-Height" constraint?
On Aug 30, 2018, at 17:23 , Demitri Muna wrote: > > I tried to force this by adding two constraints, 2 pixels above and below the > image, then got this: > > 2018-08-30 14:55:36.807612-0400 Nightlight[78272:15775715] [Layout] Unable to > simultaneously satisfy constraints: > ( >" 16 (active)>", >" (active, names: DE_DataCell:0x60c000188470, '|':DE_DataCell:0x60c000188470 > )>", >" (active, names: DE_DataCell:0x60c000188470, '|':DE_DataCell:0x60c000188470 > )>", >" DE_DataCell.height == 12 (active, names: DE_DataCell:0x60c000188470 )>" > ) “Encapsulated layout height” sounds like one of the constraints that IB adds to your layout when it’s under-constrained at design time. Are you adding the other constraints at run time? ___ 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
Re: Bothersome "NSView-Encapsulated-Layout-Height" constraint?
Hi Rob, On Aug 30, 2018, at 8:34 PM, Rob Petrovec wrote: > You need to implement -outlineView:heightOfRowByItem: to return the height > you want for each row. Hope that helps. Sorry, in my email I wrote "outlineView:rowViewForItem:” when I meant to say "outlineView:heightOfRowByItem:”, which I have returning 20 or 24. This correctly changes the row height (it is being called), but the highlighting remains at 12 pixels regardless of value. Thanks, Demitri ___ 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
Re: Bothersome "NSView-Encapsulated-Layout-Height" constraint?
You need to implement -outlineView:heightOfRowByItem: to return the height you want for each row. Hope that helps. —Rob > On Aug 30, 2018, at 6:23 PM, Demitri Muna wrote: > > Hi, > > I’ve been hitting my head against a wall for more time than I’d like to admit > on what should be a simple problem - maybe someone can spot it immediately… > > I’m implementing a view-based source list style NSOutlineView (I’m trying to > mimic the Finder sidebar). My header items are a different row height than > the items underneath. I’ve implemented outlineView:rowViewForItem: (returns > 24 for headers, 20 for items). > > The rows are spaced as expected in the column, but they are not drawn > correctly. The cell is cropped to 12 pixels, as seen here: > > https://imgur.com/a/7KKgtZX > > I expect the highlighting to extend to the full height of the row. I tried to > force this by adding two constraints, 2 pixels above and below the image, > then got this: > > 2018-08-30 14:55:36.807612-0400 Nightlight[78272:15775715] [Layout] Unable to > simultaneously satisfy constraints: > ( >" 16 (active)>", >" (active, names: DE_DataCell:0x60c000188470, '|':DE_DataCell:0x60c000188470 > )>", >" (active, names: DE_DataCell:0x60c000188470, '|':DE_DataCell:0x60c000188470 > )>", >" DE_DataCell.height == 12 (active, names: DE_DataCell:0x60c000188470 )>" > ) > > This shows where the problem is: a height constraint on the row of 12 with > the name "NSView-Encapsulated-Layout-Height”. This is the exact height I see > being drawn. I have no idea where this is coming from or how to fix it > though. Any help welcome - it’s annoying because this seems like such simple > thing! > > Demitri > ___ > > 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/petrock%40mac.com > > This email sent to petr...@mac.com ___ 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
Bothersome "NSView-Encapsulated-Layout-Height" constraint?
Hi, I’ve been hitting my head against a wall for more time than I’d like to admit on what should be a simple problem - maybe someone can spot it immediately… I’m implementing a view-based source list style NSOutlineView (I’m trying to mimic the Finder sidebar). My header items are a different row height than the items underneath. I’ve implemented outlineView:rowViewForItem: (returns 24 for headers, 20 for items). The rows are spaced as expected in the column, but they are not drawn correctly. The cell is cropped to 12 pixels, as seen here: https://imgur.com/a/7KKgtZX I expect the highlighting to extend to the full height of the row. I tried to force this by adding two constraints, 2 pixels above and below the image, then got this: 2018-08-30 14:55:36.807612-0400 Nightlight[78272:15775715] [Layout] Unable to simultaneously satisfy constraints: ( "", "", "", "" ) This shows where the problem is: a height constraint on the row of 12 with the name "NSView-Encapsulated-Layout-Height”. This is the exact height I see being drawn. I have no idea where this is coming from or how to fix it though. Any help welcome - it’s annoying because this seems like such simple thing! Demitri ___ 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