Bindings setup with NSCollectionViews

2014-06-17 Thread Hajder Rabiee
Hi all I am having trouble getting the master-detail binding configuration setup correctly. I've sat down far too many hours trying to debug this and I hope anyone can give me a hint on how to solve this issue. The full problem description can be found already at http://stackoverflow.com/question

Re: app icon for Launchpad

2014-06-17 Thread Roland King
On 18 Jun, 2014, at 12:15 am, Todd Heberlein wrote: > > On Jun 16, 2014, at 8:35 PM, Roland King wrote: > >> My OSX app has an icon. It shows in the dock when active, it shows on >> Alt-Tab, it shows in the Applications folder, however in Launchpad I get the >> generic OSX Application Icon.

Re: Color closest to color

2014-06-17 Thread Graham Cox
On 18 Jun 2014, at 12:04 am, Maxthon Chan wrote: > moronically :) monotonically? But maybe both are true! --Graham ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contac

Re: Dictionaries or custom class containing no methods?

2014-06-17 Thread Trygve Inda
> > On Jun 17, 2014, at 4:16 PM, Trygve Inda wrote: > >>> Doesn't seem weird to me, I do it all the time. One advantage of using a >>> custom class over a dictionary is that the compiler knows what's expected of >>> it, while a dictionary is just a black box. >>> >>> >>> On Jun 17, 2014, at 3:2

Re: Dictionaries or custom class containing no methods?

2014-06-17 Thread Lee Ann Rucker
On Jun 17, 2014, at 4:16 PM, Trygve Inda wrote: >> Doesn't seem weird to me, I do it all the time. One advantage of using a >> custom class over a dictionary is that the compiler knows what's expected of >> it, while a dictionary is just a black box. >> >> >> On Jun 17, 2014, at 3:21 PM, Trygve

Re: Dictionaries or custom class containing no methods?

2014-06-17 Thread Trygve Inda
> Doesn't seem weird to me, I do it all the time. One advantage of using a > custom class over a dictionary is that the compiler knows what's expected of > it, while a dictionary is just a black box. > > > On Jun 17, 2014, at 3:21 PM, Trygve Inda wrote: > >> I need to store a large collection of

Re: Dictionaries or custom class containing no methods?

2014-06-17 Thread Quincey Morris
On Jun 17, 2014, at 15:21 , Trygve Inda wrote: > Thoughts on the pros and cons of both methods? I strongly agree with Lee Ann that the custom class is a better approach. It almost always happens that you (eventually) want to associate behavior with the properties. There can also be issues tryi

Re: Dictionaries or custom class containing no methods?

2014-06-17 Thread Lee Ann Rucker
Doesn't seem weird to me, I do it all the time. One advantage of using a custom class over a dictionary is that the compiler knows what's expected of it, while a dictionary is just a black box. On Jun 17, 2014, at 3:21 PM, Trygve Inda wrote: > I need to store a large collection of settings (no

Dictionaries or custom class containing no methods?

2014-06-17 Thread Trygve Inda
I need to store a large collection of settings (not application preferences, but parameters describing how complex data is to be displayed) and am looking for pros/cons as to the best way. At the top I have a class called MySettings. Within this I need to have groups of related settings. They can

how can I get info from "vec_ycc_bgrx_convert" crash?

2014-06-17 Thread vipgs99
I've got lots of crash like this below: Thread : Crashed: com.apple.main-thread 0 ImageIO0x30c808fc vec_ycc_bgrx_convert + 427 1 ???0x27d440d0 2 ImageIO0x30c80707 sep_upsample + 170 3 ImageIO

Re: app icon for Launchpad

2014-06-17 Thread Todd Heberlein
On Jun 16, 2014, at 8:35 PM, Roland King wrote: > My OSX app has an icon. It shows in the dock when active, it shows on > Alt-Tab, it shows in the Applications folder, however in Launchpad I get the > generic OSX Application Icon. As the previous reply said, it might be a caching issue. Tr

Re: app icon for Launchpad

2014-06-17 Thread Kyle Sluder
On Jun 17, 2014, at 5:36 AM, dangerwillrobinsondan...@gmail.com wrote: > > Try it after building after changing the bundle identifier. > Then the OS will see it as a different app. Try bumping the bundle version first. Often the bundle name can't be changed. --Kyle Sluder _

Re: NSCoding vs NSSecureCoding

2014-06-17 Thread Tony Parker
> On Jun 17, 2014, at 8:00 AM, Mike Abdullah wrote: > > > On 17 Jun 2014, at 15:50, Sean McBride wrote: > >> On Tue, 17 Jun 2014 09:17:46 +0100, Mike Abdullah said: >> >>> I suspect the rationale might be “NSColor and NSImage live in AppKit, >>> not Foundation, and the AppKit engineers aren’t

Re: NSCoding vs NSSecureCoding

2014-06-17 Thread Mike Abdullah
On 17 Jun 2014, at 15:50, Sean McBride wrote: > On Tue, 17 Jun 2014 09:17:46 +0100, Mike Abdullah said: > >> I suspect the rationale might be “NSColor and NSImage live in AppKit, >> not Foundation, and the AppKit engineers aren’t so bothered about secure >> coding" > > That's a good theory. S

Re: NSCoding vs NSSecureCoding

2014-06-17 Thread Sean McBride
On Tue, 17 Jun 2014 09:17:46 +0100, Mike Abdullah said: >I suspect the rationale might be “NSColor and NSImage live in AppKit, >not Foundation, and the AppKit engineers aren’t so bothered about secure >coding" That's a good theory. So I just looked through Foundation and found numerous other cl

Re: Color closest to color

2014-06-17 Thread Maxthon Chan
Once again, you don’t need to perform the square root before comparing. It is a waste of processor resource and not doing ti will not throw off comparison (since mathematically, square root function is moronically increasing.) On Jun 17, 2014, at 22:02, Jonathan Taylor wrote: > Thanks everyone

Re: Color closest to color

2014-06-17 Thread edward taffel
you may wish to look up ‘Delta E’. [what has this to do w/ cocoa?] On Jun 17, 2014, at 9:29 AM, Maxthon Chan wrote: > Alternatively I have an idea based on HSB colours: difference in hue in > radians raised to 4th power (or 6th) plus squared Euclidean distance of > saturation and brightness.

Re: Color closest to color

2014-06-17 Thread Jonathan Taylor
Thanks everyone. I had thought there might be a pre-existing API that would do this (I was half expecting to find a method defined for the NSColorList class...), but I will implement the euclidean distance test myself... Cheers Jonny. On 17 Jun 2014, at 12:43, Maxthon Chan wrote: > One easy-to

Re: Color closest to color

2014-06-17 Thread Maxthon Chan
Alternatively I have an idea based on HSB colours: difference in hue in radians raised to 4th power (or 6th) plus squared Euclidean distance of saturation and brightness. On Jun 17, 2014, at 21:22, Torsten Curdt wrote: > RGB is not perceptually uniform, hence the Euclidean distance is not qui

Re: Color closest to color

2014-06-17 Thread Maxthon Chan
I know, it is just sqared Euclidean distance is simplest to calculate. Sure you can, for example, add coefficients to the formula, to adjust. On Jun 17, 2014, at 21:22, Torsten Curdt wrote: > RGB is not perceptually uniform, hence the Euclidean distance is not quite > right. > Wikipedia and St

Re: Color closest to color

2014-06-17 Thread Torsten Curdt
RGB is not perceptually uniform, hence the Euclidean distance is not quite right. Wikipedia and Stackoverflow has more information on this: http://en.wikipedia.org/wiki/Color_difference http://stackoverflow.com/questions/9018016/how-to-compare-two-colors cheers, Torsten __

Re: Color closest to color

2014-06-17 Thread Scott Ribe
On Jun 17, 2014, at 7:14 AM, Mills, Steve wrote: > The algorithm I've seen then takes the square root of that value. If the square root of a is larger than the square root of b, then a is larger than b ;-) (In this case a & b will both be positive.) -- Scott Ribe scott_r...@elevated-dev.com

Re: Color closest to color

2014-06-17 Thread Maxthon Chan
Square rooting is slow, and not calculating square root do not throw off comparison. On Jun 17, 2014, at 21:14, Mills, Steve wrote: > On Jun 17, 2014, at 06:43:54, Maxthon Chan wrote: > >> One easy-to-implement method: colour cube. >> >> Define a colour using its RGB values as a 3-tuple (r,

Re: Color closest to color

2014-06-17 Thread Mills, Steve
On Jun 17, 2014, at 06:43:54, Maxthon Chan wrote: > One easy-to-implement method: colour cube. > > Define a colour using its RGB values as a 3-tuple (r, g, b) and standard > colours (ri, gi, bi) (where i = 0..n).The square distance between the given > colour and a standard colour is (ri-r)^2+(

Re: app icon for Launchpad

2014-06-17 Thread dangerwillrobinsondanger
Try it after building after changing the bundle identifier. Then the OS will see it as a different app. Sent from my iPhone > On 2014/06/17, at 21:19, Roland King wrote: > > Applications for the Launchpad, it was not, then re-installed it from the > installer which put it back in Applicatio

Re: app icon for Launchpad

2014-06-17 Thread Roland King
On 17 Jun, 2014, at 8:06 pm, Uli Kusterer wrote: > On 17 Jun 2014, at 10:55, Jean-Daniel Dupas wrote: >> That's probably a Launchpad icon caching issue. I don't know where it used >> to cache icons though. > > I’ve seen such issues with beta versions of Mac OS that are out there right > now.

Re: NSCoding vs NSSecureCoding

2014-06-17 Thread Graham Cox
On 17 Jun 2014, at 9:33 am, Sean McBride wrote: > NSImage support only NSCoding You don't want to be archiving NSImage objects if you can help it, FWIW. Some variants don't even support it, like the one you get from the IKPictureTaker. --Graham

Re: app icon for Launchpad

2014-06-17 Thread Uli Kusterer
On 17 Jun 2014, at 10:55, Jean-Daniel Dupas wrote: > That's probably a Launchpad icon caching issue. I don't know where it used to > cache icons though. I’ve seen such issues with beta versions of Mac OS that are out there right now. That wouldn’t be the case for you, would it? I also occasion

Re: NSCoding vs NSSecureCoding

2014-06-17 Thread Uli Kusterer
On 17 Jun 2014, at 11:36, Maxthon Chan wrote: > Personal suggestion, convert colors to strings (you can use any format, but I > prefer #RRGGBB., drop the . for opaque color, which is compact and > easily understood by humans) and images to PNG data (lossless), then archive. Probably be

Re: Color closest to color

2014-06-17 Thread Maxthon Chan
One easy-to-implement method: colour cube. Define a colour using its RGB values as a 3-tuple (r, g, b) and standard colours (ri, gi, bi) (where i = 0..n).The square distance between the given colour and a standard colour is (ri-r)^2+(gi-g)^2+(bi-b)^2. You can calculate square distances between

Color closest to color

2014-06-17 Thread Jonathan Taylor
Hi all, Is there a way of identifying the closest match to a given NSColor, out of a list of possible colors to match? The user could have selected any color using the color picker, but I would like to know whether it is "approximately red", green, blue or white. Of course, it might be e.g. ma

Re: NSCoding vs NSSecureCoding

2014-06-17 Thread Maxthon Chan
Personal suggestion, convert colors to strings (you can use any format, but I prefer #RRGGBB., drop the . for opaque color, which is compact and easily understood by humans) and images to PNG data (lossless), then archive. On Jun 17, 2014, at 17:30, Greg Weston wrote: > Sean McBride wo

Re: NSCoding vs NSSecureCoding

2014-06-17 Thread Greg Weston
Sean McBride wonders: > I was modernizing some of my code to support NSSecureCoding instead of just > NSCoding and stumbled upon that fact that NSColor and NSImage support only > NSCoding and not NSSecureCoding. Whereas NSURL, NSData, NSArray and > countless others now support NSSecureCoding.

Re: app icon for Launchpad

2014-06-17 Thread Jean-Daniel Dupas
That's probably a Launchpad icon caching issue. I don't know where it used to cache icons though. Le 17 juin 2014 à 05:35, Roland King a écrit : > My OSX app has an icon. It shows in the dock when active, it shows on > Alt-Tab, it shows in the Applications folder, however in Launchpad I get th

Re: NSCoding vs NSSecureCoding

2014-06-17 Thread Michael Starke
On 17 Jun 2014, at 01:33, Sean McBride wrote: > Hi all, > > I was modernizing some of my code to support NSSecureCoding instead of just > NSCoding and stumbled upon that fact that NSColor and NSImage support only > NSCoding and not NSSecureCoding. Whereas NSURL, NSData, NSArray and > countl

Re: NSCoding vs NSSecureCoding

2014-06-17 Thread Mike Abdullah
On 17 Jun 2014, at 00:33, Sean McBride wrote: > Hi all, > > I was modernizing some of my code to support NSSecureCoding instead of just > NSCoding and stumbled upon that fact that NSColor and NSImage support only > NSCoding and not NSSecureCoding. Whereas NSURL, NSData, NSArray and > countl