Re: ARC conversion help - CFErrorRef* and NSError**

2012-10-30 Thread Quincey Morris
On Oct 29, 2012, at 22:24 , Rick Mann rm...@latencyzero.com wrote: Any way to introduce (into clang) an __attribute__ or something similar on the declaration of NSError to say it's equivalent to CFErrorRef? Except that they're not equivalent, in memory management terms. CF and NS objects

Re: how to clip inside a path

2012-10-30 Thread Vincent Habchi
On 30 oct. 2012, at 01:24, Jens Alfke j...@mooseyard.com wrote: There was a pretty serious proposal floated on objc-language earlier this year (by a non-Apple person), but as far as I can tell it devolved into a bunch of arguing over details, and didn’t go anywhere. (And further discussion

Re: how to clip inside a path

2012-10-30 Thread Vincent Habchi
On 30 oct. 2012, at 07:25, Vincent Habchi vi...@macports.org wrote: http://www.eerolanguage.org. I maintain the package on MacPorts, if you want to have a try. Should be http://eerolanguage.org. There is no leading www. V. ___ Cocoa-dev mailing list

Re: ARC conversion help - CFErrorRef* and NSError**

2012-10-30 Thread Rick Mann
On Oct 29, 2012, at 23:23 , Quincey Morris quinceymor...@rivergatesoftware.com wrote: Except that they're not equivalent, in memory management terms. CF and NS objects have different rules. IIRC, it's also not safe to assume that CF and NS (when toll-free bridged for a class) use the

Re: ARC conversion help - CFErrorRef* and NSError**

2012-10-30 Thread Roland King
On 30 Oct, 2012, at 5:39 PM, Rick Mann rm...@latencyzero.com wrote: Then again, I ran into a problem that I don't know how to properly solve, using CFSockets. I need to retain an NSObject I pass into CFSocket, and have it released when the socket is released, not when a callback occurs,

Re: ARC conversion help - CFErrorRef* and NSError**

2012-10-30 Thread Ken Thomases
On Oct 30, 2012, at 4:39 AM, Rick Mann wrote: Then again, I ran into a problem that I don't know how to properly solve, using CFSockets. I need to retain an NSObject I pass into CFSocket, and have it released when the socket is released, not when a callback occurs, but there's no good way

Re: Cocoa-dev Digest, Vol 9, Issue 751

2012-10-30 Thread Glen Low
All On 30/10/2012, at 12:44 AM, cocoa-dev-requ...@lists.apple.com wrote: From: Jens Alfke Subject: Re: zlib, objective-zip, NSDataCategory Date: 30 October 2012 12:44:37 AM AWST To: Michael Brian Bentley Cc: cocoa-dev@lists.apple.com On Oct 25, 2012, at 3:01 PM, Michael Brian Bentley

Re: iOS 6 changes in CATextLayer text drawing

2012-10-30 Thread Matt Neuburg
And as expected this has been pushed back at me: Works as expected. Apple doesn't mind at all if the very same app with the very same code compiled against the very same SDK draws its text in completely different places under different systems. m. Date: Mon, 29 Oct 2012 08:43:14 -0700 From:

CALayer still has no constraints on iOS

2012-10-30 Thread Matt Neuburg
I find it odd that UIView on iOS now has the wonderful CALayoutConstraint system, but CALayer doesn't have anything analogous. This means that a sublayer - that is, a sublayer of a view's layer - just sits there like a bump on a log when the view is resized. To give an example, Apple has made

Re: createDirectoryAtPath:withIntermediateDirectories:attributes:error: Returns NO when it exists

2012-10-30 Thread Sean McBride
On Mon, 29 Oct 2012 10:22:57 +0100, Andreas Grosam said: I'm attempting to create a directory with NSFileManager's method. The directory may already exist. According the documentation https://developer.apple.com/library/mac/ #documentation/Cocoa/Reference/Foundation/Classes/NSFileManager_Class/

Re: createDirectoryAtPath:withIntermediateDirectories:attributes:error: Returns NO when it exists

2012-10-30 Thread Quincey Morris
On Oct 30, 2012, at 10:39 , Sean McBride s...@rogue-research.com wrote: Note that in my experience YES is returned if the directory exists. It's also worth consulting the header file comments: createDirectoryAtPath:withIntermediateDirectories:attributes:error: creates a directory at the

iOS always tells us that the user declined push notifications, even when that's BS.

2012-10-30 Thread Gavin Stokes
I noticed that every device registered in our database for our just-approved app is showing up as having declined all push notifications. None of our testers' devices had this problem, and I couldn't repro it on mine. Of course, testing this is nearly impossible, because Apple gives developers

CFNetworking and ARC (was: ARC conversion help - CFErrorRef* and NSError**)

2012-10-30 Thread Rick Mann
On Oct 30, 2012, at 3:15 , Roland King r...@rols.org wrote: how did you do it before, in non-ARC, what's the code look like? There must be a combination of CFBridgingRetain(), CFBridgingRelease() and (__bridge .. ) you can use to do what you're doing. Before, I used explicit retain and

Re: CFNetworking and ARC (was: ARC conversion help - CFErrorRef* and NSError**)

2012-10-30 Thread Greg Parker
On Oct 30, 2012, at 4:59 PM, Rick Mann rm...@latencyzero.com wrote: On Oct 30, 2012, at 3:15 , Roland King r...@rols.org wrote: how did you do it before, in non-ARC, what's the code look like? There must be a combination of CFBridgingRetain(), CFBridgingRelease() and (__bridge .. ) you can

Re: CFNetworking and ARC (was: ARC conversion help - CFErrorRef* and NSError**)

2012-10-30 Thread Rick Mann
On Oct 30, 2012, at 17:10 , Greg Parker gpar...@apple.com wrote: On Oct 30, 2012, at 4:59 PM, Rick Mann rm...@latencyzero.com wrote: On Oct 30, 2012, at 3:15 , Roland King r...@rols.org wrote: how did you do it before, in non-ARC, what's the code look like? There must be a combination of

Re: CFNetworking and ARC (was: ARC conversion help - CFErrorRef* and NSError**)

2012-10-30 Thread Roland King
On 31 Oct, 2012, at 7:59 AM, Rick Mann rm...@latencyzero.com wrote: On Oct 30, 2012, at 3:15 , Roland King r...@rols.org wrote: how did you do it before, in non-ARC, what's the code look like? There must be a combination of CFBridgingRetain(), CFBridgingRelease() and (__bridge .. ) you

Re: CFNetworking and ARC (was: ARC conversion help - CFErrorRef* and NSError**)

2012-10-30 Thread Rick Mann
On Oct 30, 2012, at 17:27 , Roland King r...@rols.org wrote: I must be missing something here. Why can't you just set up your CFSocketContext with CFRetain for the CFAllocatorRetainCallback, CFRelease for the CFAllocatorReleaseCallback and cast the object to the (void*)info paramter with

Re: CFNetworking and ARC (was: ARC conversion help - CFErrorRef* and NSError**)

2012-10-30 Thread Roland King
On 31 Oct, 2012, at 8:30 AM, Rick Mann rm...@latencyzero.com wrote: On Oct 30, 2012, at 17:27 , Roland King r...@rols.org wrote: I must be missing something here. Why can't you just set up your CFSocketContext with CFRetain for the CFAllocatorRetainCallback, CFRelease for the

Re: CFNetworking and ARC (was: ARC conversion help - CFErrorRef* and NSError**)

2012-10-30 Thread Greg Parker
On Oct 30, 2012, at 5:12 PM, Rick Mann rm...@latencyzero.com wrote: On Oct 30, 2012, at 17:10 , Greg Parker gpar...@apple.com wrote: On Oct 30, 2012, at 4:59 PM, Rick Mann rm...@latencyzero.com wrote: On Oct 30, 2012, at 3:15 , Roland King r...@rols.org wrote: how did you do it before, in

Re: CFNetworking and ARC (was: ARC conversion help - CFErrorRef* and NSError**)

2012-10-30 Thread Rick Mann
On Oct 30, 2012, at 17:35 , Greg Parker gpar...@apple.com wrote: It is. All NS object types are bridged to a generic NSCFType if they aren't bridged to something more specific. CFRetain() et al work on all objects. The CF functions are the recommended and expected solution for explicit

Re: CFNetworking and ARC (was: ARC conversion help - CFErrorRef* and NSError**)

2012-10-30 Thread Rick Mann
On Oct 30, 2012, at 17:27 , Roland King r...@rols.org wrote: I must be missing something here. Why can't you just set up your CFSocketContext with CFRetain for the CFAllocatorRetainCallback, CFRelease for the CFAllocatorReleaseCallback and cast the object to the (void*)info paramter with

Re: CFNetworking and ARC (was: ARC conversion help - CFErrorRef* and NSError**)

2012-10-30 Thread Roland King
It's not needed after the call has finished, just used to create the socket, so no retain or copy needed. On 31 Oct, 2012, at 10:16, Rick Mann rm...@latencyzero.com wrote: On Oct 30, 2012, at 17:27 , Roland King r...@rols.org wrote: I must be missing something here. Why can't you just

Re: CFNetworking and ARC (was: ARC conversion help - CFErrorRef* and NSError**)

2012-10-30 Thread Ken Thomases
On Oct 30, 2012, at 9:20 PM, Roland King wrote: On 31 Oct, 2012, at 10:16, Rick Mann rm...@latencyzero.com wrote: One thing that's not clear in the docs for CFSocketCreateConnectedToSocketSignature() is what happens to the CFSocketSignature parameter. Is that information copied

Event loop expiration date insight

2012-10-30 Thread Graham Cox
I'm handling some mouse dragging tasks modally by implementing my own modal event loop using [NSApp nextEventMatchingMask:untilDate:inMode:dequeue:]. I'm wondering what is the usual correct thing to pass for the 'untilDate' parameter. For a long time I've been using [NSDate distantFuture], but