Re: Event loop expiration date insight

2012-10-30 Thread Greg Parker
On Oct 30, 2012, at 9:58 PM, Graham Cox wrote: > 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 the > documentation of this method says that by passing nil it uses [NSDate > distantPast], which i

Re: Event loop expiration date insight

2012-10-30 Thread Vincent Habchi
> 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 distantFutu

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 t

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 wrote: > >> One thing that's not clear in the docs for >> CFSocketCreateConnectedToSocketSignature() is what happens to the >> CFSocketSignature parameter. Is that information copied immediately, or >> shou

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 wrote: > > On Oct 30, 2012, at 17:27 , Roland King wrote: > >> I must be missing something here. Why can't you just set up your >> CFSocketContext

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 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 (__bridge

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 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 memory > managemen

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 wrote: > On Oct 30, 2012, at 17:10 , Greg Parker wrote: >> On Oct 30, 2012, at 4:59 PM, Rick Mann wrote: >>> On Oct 30, 2012, at 3:15 , Roland King wrote: how did you do it before, in non-ARC, what's the code look like? There must be a combinati

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 wrote: > > On Oct 30, 2012, at 17:27 , Roland King 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

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 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 (__bridge

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 wrote: > > On Oct 30, 2012, at 3:15 , Roland King 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

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 wrote: > On Oct 30, 2012, at 4:59 PM, Rick Mann wrote: >> On Oct 30, 2012, at 3:15 , Roland King 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 (

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 wrote: > On Oct 30, 2012, at 3:15 , Roland King 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.

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 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 release. But

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 no

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 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 specified path. If you

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 #documentation/Cocoa/Reference/Foundation/Classes/NSFileManager_C

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 i

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 > Fro

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

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 w

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

2012-10-30 Thread Roland King
On 30 Oct, 2012, at 5:39 PM, 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 g

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

2012-10-30 Thread Rick Mann
On Oct 29, 2012, at 23:23 , Quincey Morris 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 same underlying classes. In some

Re: how to clip inside a path

2012-10-30 Thread Vincent Habchi
On 30 oct. 2012, at 07:25, Vincent Habchi 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 (Cocoa-dev@lists