Re: Threaded drawing

2013-12-07 Thread Graham Cox
On 7 Dec 2013, at 1:05 am, Roland King r...@rols.org wrote: And reminded of the comment about how hard block syntax can be to remember, I didn't make this page, I'm not a fan of the name, but it's awfully useful and I keep it bookmarked, I tinyURLed it to avoid tripping up swear checkers,

Correct use of CFArraySortValues context parameter

2013-12-07 Thread Markus Spoettl
I recently discovered a strange memory leak in a 3rd-party component I use. A call to CFArraySortValues() sometimes produced a leak, sometimes it didn't. This was the invocation: int context = kCFCompareCaseInsensitive; CFArraySortValues(keyArray, CFRangeMake(0, count),

Re: Correct use of CFArraySortValues context parameter

2013-12-07 Thread Ken Thomases
On Dec 7, 2013, at 7:49 AM, Markus Spoettl wrote: This was the invocation: int context = kCFCompareCaseInsensitive; CFArraySortValues(keyArray, CFRangeMake(0, count), (CFComparatorFunction)CFStringCompare, context); After reading through

Re: Correct use of CFArraySortValues context parameter

2013-12-07 Thread Markus Spoettl
On 12/7/13 3:35 PM, Ken Thomases wrote: Can anyone tell me if the latter use of CFArraySortValues() is correct? It is. Your analysis is correct. It doesn't feel right to cast an int option to (void *) but the documentation simply doesn't say it will pass on a dereferenced value. The docs

Re: Threaded drawing

2013-12-07 Thread Clark Smith Cox III
On Dec 6, 2013, at 7:27, Graham Cox graham@bigpond.com wrote: On 6 Dec 2013, at 11:26 am, Graham Cox graham@bigpond.com wrote: NSBlockOperation* op = [NSBlockOperation blockOperationWithBlock:^ {

What are the contents of NSPasteboardTypeFont?

2013-12-07 Thread Jens Alfke
Does anyone know what the data format of NSPasteboardTypeFont is? Or if this type is even used at all? I’m writing a font-management app, and in the drag-and-drop code I’d like to support a standard pasteboard type instead of just something specific to my app, but I can’t figure out if there

Re: What are the contents of NSPasteboardTypeFont?

2013-12-07 Thread Kyle Sluder
On Sat, Dec 7, 2013, at 12:27 PM, Jens Alfke wrote: Does anyone know what the data format of NSPasteboardTypeFont is? Or if this type is even used at all? According to the Pasteboard Programming Guide, NSPasteboardTypeFont is a UTI that is equivalent to the old NSFontPboardType:

OS X : Different icon for Status Item

2013-12-07 Thread Jerry Krinock
How can I make my app’s Status Item (“menulet, right side of menu bar) have a different icon than its icon shown in the Dock and Finder? I cannot find any mention of this in “Status Item Programming Topics”, and tests indicate that it simply uses the same .icns resource indicated by

Re: OS X : Different icon for Status Item

2013-12-07 Thread Seth Willits
On Dec 7, 2013, at 8:47 PM, Jerry Krinock je...@ieee.org wrote: How can I make my app’s Status Item (“menulet, right side of menu bar) have a different icon than its icon shown in the Dock and Finder? I cannot find any mention of this in “Status Item Programming Topics”, and tests