NSPredicate and custom sort selector

2014-05-29 Thread Trygve Inda
I have an array of objects. One property of this object is a ratio stored as a string (e.g. 5:8, 9:4, 21:2) etc. I have a category on NSString: -(NSComparisonResult)compareAspectString:(NSString *)aString This does the division and compares the aspect ratios correctly. Now I need a predicate

Re: NSPredicate and custom sort selector

2014-05-29 Thread Ken Thomases
On May 29, 2014, at 2:52 PM, Trygve Inda wrote: I have an array of objects. One property of this object is a ratio stored as a string (e.g. 5:8, 9:4, 21:2) etc. I have a category on NSString: -(NSComparisonResult)compareAspectString:(NSString *)aString This does the division and

Re: NSPredicate and custom sort selector

2014-05-29 Thread Trygve Inda
On May 29, 2014, at 2:52 PM, Trygve Inda wrote: I have an array of objects. One property of this object is a ratio stored as a string (e.g. 5:8, 9:4, 21:2) etc. I have a category on NSString: -(NSComparisonResult)compareAspectString:(NSString *)aString This does the division and

How to write a .icns file

2014-05-29 Thread John Brownie
Simplified from the previous question, which didn't get any responses: How can I write a .icns file when there are 15 images, which is too many for ImageIO to handle? I can get it as an NSImage, but can't see how to write it to a file (or to an NSData object). John -- John Brownie,