Re: Auto layout without ambiguity
> On 2 Nov 2014, at 09:01, Roland King wrote: > > >> On 2 Nov 2014, at 12:17 am, Gerriet M. Denkmann wrote: >> >> 10.10 >> >> From left to right: >> >> fixed distance from super view >> Label >> fixed distance >> TextField (this should be ≥ something, otherwise fitting to content) >> fixed distance >> Label >> variable distance (≥ some minimum) >> Button >> fixed distance to super view >> >> When I set the width of TextField to ≥ something, Xcode (6.1) complains >> about ambiguity. >> I tried to set the horizontal content hugging value of the TextField to max >> (1000) but still get ambiguity. >> >> So I have to set width of TextField to = something, which does not look very >> nice. >> >> How to solve this? > > > Fix the second distance instead of making it variable and make the label of > variable width (>=) and left or right align it so it’s effectively the same > as having a variable space. That should work. Now: ... fixed distance TextField.width ≥ 33 fixed distance Label.width ≥ 56 fixed distance ... Result: No Ambiguity Label.width = 56 (never changes) TextField.width grows or shrinks to make all fit into the window. Can shrink to 0 (ignoring my width ≥ 33). TextField.width does not react to size of input. This auto layout seems to be a very useful feature; but sometimes it drives my crazy. By the way: there was in Xcode a way to test a nib without running the app. Can't find this anymore in 6.1. Where is this hiding? Kind regards, Gerriet. ___ 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: Auto layout without ambiguity
> On 2 Nov 2014, at 12:17 am, Gerriet M. Denkmann wrote: > > 10.10 > > From left to right: > > fixed distance from super view > Label > fixed distance > TextField (this should be ≥ something, otherwise fitting to content) > fixed distance > Label > variable distance (≥ some minimum) > Button > fixed distance to super view > > When I set the width of TextField to ≥ something, Xcode (6.1) complains about > ambiguity. > I tried to set the horizontal content hugging value of the TextField to max > (1000) but still get ambiguity. > > So I have to set width of TextField to = something, which does not look very > nice. > > How to solve this? Textfields don’t have intrinsic content size, so the content hugging etc makes no difference. Neither does ‘space’. So you have two things in the line which have an inequality but don’t have the constraints of lower rank which content hugging etc add in. Which makes the layout ambiguous. Fix the second distance instead of making it variable and make the label of variable width (>=) and left or right align it so it’s effectively the same as having a variable space. That should work. ___ 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: Auto layout without ambiguity
> On 2 Nov 2014, at 00:41, Marco S Hyman wrote: > > On Nov 1, 2014, at 9:17 AM, Gerriet M. Denkmann wrote: >> >> TextField (this should be ≥ something, otherwise fitting to content) >> ... >> variable distance (≥ some minimum) > > Are they the same priorities? I experimented with these: TextField.width ≥ 22; priority: 1000, 999, 1 and variable distance (≥ some minimum); priority 1000, 555, 2 but no success: the width of the TextField is still declared as ambiguous, regardless how I set the prioritues. Kind regards, Gerriet. ___ 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: hueComponent not valid for the NSColor
> > Guess my real question is: > > Why is "whiteColor" not in RGB while "redColor" is? > Just because is doesn't have to? Exactly. Why to use 3 components when you could use only 1 to describe the same value? ___ 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: hueComponent not valid for the NSColor
> It's a color space that only contains a white and alpha component. Hue doesn't make sense in an all white space. It's like if we were talking about a train that only goes between NYC and DC, and you asked "How long does it take for that train to reach London?" You can't ask that question because the train doesn't go there. It doesn't have that degree of freedom. > > Your second example has white in a RGB color space. That does have the freedom to give you hue. Thanks for very simplified explanation :) This works: NSColor *base = [[NSColor whiteColor] colorUsingColorSpace:[NSColorSpace genericRGBColorSpace]]; NSColor *stroke = [NSColor colorWithCalibratedHue:base.hueComponent saturation:base.saturationComponent brightness:0.4 alpha:base.alphaComponent]; Guess my real question is: Why is "whiteColor" not in RGB while "redColor" is? Just because is doesn't have to? Don't see it in the docs either. cheers, Torsten ___ 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: hueComponent not valid for the NSColor
It's a color space that only contains a white and alpha component. Hue doesn't make sense in an all white space. It's like if we were talking about a train that only goes between NYC and DC, and you asked "How long does it take for that train to reach London?" You can't ask that question because the train doesn't go there. It doesn't have that degree of freedom. Your second example has white in a RGB color space. That does have the freedom to give you hue. On Sat, Nov 1, 2014 at 2:36 PM, Torsten Curdt wrote: > I am struggling to understand why this causes an exception > > NSColor *base = [NSColor whiteColor]; > NSColor *stroke = [NSColor colorWithCalibratedHue:base.hueComponent > > saturation:base.saturationComponent >brightness:0.4 > alpha:base.alphaComponent]; > > "-hueComponent not valid for the NSColor NSCalibratedWhiteColorSpace 1 1; > need to first convert colorspace." > > While the following colors work OK > > - [NSColor colorWithRed:1.0 green:1.0 blue:1.0 alpha:1.0] > - [NSColor redColor] > > Can anyone offer some insights? > > cheers, > Torsten > ___ > > 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/stephen.butler%40gmail.com > > This email sent to stephen.but...@gmail.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
Re: hueComponent not valid for the NSColor
Hi, [NSColor whiteColor] produced a color which using the NSCalibratedWhiteColorSpace, and “hue” component is not exists in a "white-only colorspace”. In other words, that is not an RGB color space, that color space only contains white - but hue cannot be interpreted there. Tamas > On 01 Nov 2014, at 20:36, Torsten Curdt wrote: > > I am struggling to understand why this causes an exception > >NSColor *base = [NSColor whiteColor]; >NSColor *stroke = [NSColor colorWithCalibratedHue:base.hueComponent > > saturation:base.saturationComponent > brightness:0.4 >alpha:base.alphaComponent]; > > "-hueComponent not valid for the NSColor NSCalibratedWhiteColorSpace 1 1; > need to first convert colorspace." > > While the following colors work OK > > - [NSColor colorWithRed:1.0 green:1.0 blue:1.0 alpha:1.0] > - [NSColor redColor] > > Can anyone offer some insights? > > cheers, > Torsten > ___ > > 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/tamas.lov.nagy%40gmail.com > > This email sent to tamas.lov.n...@gmail.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
hueComponent not valid for the NSColor
I am struggling to understand why this causes an exception NSColor *base = [NSColor whiteColor]; NSColor *stroke = [NSColor colorWithCalibratedHue:base.hueComponent saturation:base.saturationComponent brightness:0.4 alpha:base.alphaComponent]; "-hueComponent not valid for the NSColor NSCalibratedWhiteColorSpace 1 1; need to first convert colorspace." While the following colors work OK - [NSColor colorWithRed:1.0 green:1.0 blue:1.0 alpha:1.0] - [NSColor redColor] Can anyone offer some insights? cheers, Torsten ___ 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: Auto layout without ambiguity
On Nov 1, 2014, at 9:17 AM, Gerriet M. Denkmann wrote: > > TextField (this should be ≥ something, otherwise fitting to content) > ... > variable distance (≥ some minimum) Are they the same priorities? Marc ___ 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
Auto layout without ambiguity
10.10 From left to right: fixed distance from super view Label fixed distance TextField (this should be ≥ something, otherwise fitting to content) fixed distance Label variable distance (≥ some minimum) Button fixed distance to super view When I set the width of TextField to ≥ something, Xcode (6.1) complains about ambiguity. I tried to set the horizontal content hugging value of the TextField to max (1000) but still get ambiguity. So I have to set width of TextField to = something, which does not look very nice. How to solve this? Gerriet. ___ 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
Editing NSOutlineView Group Item
I've got an NSOutlineView backed by a manually mapped core data based document model of which I can save edits to the persistence store just fine. I have created a detail view which can update the text of the selected item - and for the most part, telling the outline view to reload data for the selected row is working out ... unless the row is designated as a GROUP row. The group row just doesn't seem to respond to a reload directive ... even if I include all the columns (of which it really has none). How do I get an NSOutlineView row, designated as a "group" row, to reload itself? Thanks, -Luther ___ 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
terminationHandler of NSTask delayed
App with NSTimer, which periodically starts an NSTask, which has a terminationHandler. Sometimes (no idea how to trigger this) the terminationHandlers do NOT get executed when the task terminates. Only when I make my app active, a whole bunch of them will - but not in the correct order. Is this normal, to be expected behaviour, or a bug? 10.10 Gerriet. ___ 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