Re: Can I somehow encourage the deallocation of a dismissed view controller?

2012-02-09 Thread G S
Thanks again, Conrad. Are there *any* connections to your control (other than the superview/subview relationship)? I see a _NSSetObjectValueForKeyInIvar in your retain trace, which just be doing something internal, but it makes me wonder. There is an IBOutlet for it, but that's it. I

Re: How to tell Xcode to forget file

2012-02-09 Thread Alexander Reichstadt
It seems the git repo somewhere stores the project filename outside the source directories. After recreating the project with a new name in the same location it worked. But where does git store its project information? There is no thing like a .git directory like there is for svn. Am

This game is not recognized by Game Center

2012-02-09 Thread Rick Mann
I'm having a heck of a time with this. It works in the simulator if I create a new sandbox ID by starting within my app. The Game Center app will show me as logged into the sandbox under that account. If my app is running, then the Game Center app shows one game in the Games tab. Otherwise it

Re: How to tell Xcode to forget file

2012-02-09 Thread Alexander Reichstadt
Never mind, I found a docu on git and where to look for .git and found it. Thanks Am 09.02.2012 um 09:22 schrieb Alexander Reichstadt: It seems the git repo somewhere stores the project filename outside the source directories. After recreating the project with a new name in the same

Re: How to get bookmarks data for non-existing files

2012-02-09 Thread Gerriet M. Denkmann
On 9 Feb 2012, at 10:33, Quincey Morris wrote: On Feb 8, 2012, at 18:20 , Gerriet M. Denkmann wrote: The only keys which seem to work for an non-existing file seem to be: NSURLNameKey NSURLIsDirectoryKey NSURLIsRegularFileKey NSURLIsSymbolicLinkKey

Re: How to get bookmarks data for non-existing files

2012-02-09 Thread John Joyce
On Feb 9, 2012, at 7:06 AM, Gerriet M. Denkmann wrote: On 9 Feb 2012, at 10:33, Quincey Morris wrote: On Feb 8, 2012, at 18:20 , Gerriet M. Denkmann wrote: The only keys which seem to work for an non-existing file seem to be: NSURLNameKey NSURLIsDirectoryKey

Re: Can I somehow encourage the deallocation of a dismissed view controller?

2012-02-09 Thread Fritz Anderson
On 9 Feb 2012, at 2:17 AM, G S wrote: However, the control still isn't deallocated when its parent view is. Now that the scheme of retains and releases has changed after removing the orphan IBOutlet connection, I'd return to a first-principles question: You say it isn't deallocated _when its

How to cancel a loading document in NSDocument's readFromURL:ofType:error method ?

2012-02-09 Thread Gilles Celli
Hi, I searched the mailing-list but didn't find an answer….so sorry if this was posted before: I've setup a document based application which can read large ASCII data files (150MB). When opening the document the method readFromURL:ofType:error is used which then opens a small feedback window

Re: drawing 1 bit images, and image resolution

2012-02-09 Thread Chris Paveglio
Interesting idea, but I need to work (the file on disk) with it as soon as it's saved, so that might not be an option but I'll keep it as a last resort. I got the image-size and saving worked out, still looking for a way to convert to 1-bit. - Original Message - From: z...@mac.com

Re: How to cancel a loading document in NSDocument's readFromURL:ofType:error method ?

2012-02-09 Thread Mike Abdullah
Set an ivar in your document which the read method checks periodically. If the user cancelled, then return NO with an NSUserCancelledError. On 9 Feb 2012, at 16:01, Gilles Celli wrote: Hi, I searched the mailing-list but didn't find an answer….so sorry if this was posted before: I've

Re: How to cancel a loading document in NSDocument's readFromURL:ofType:error method ?

2012-02-09 Thread Kyle Sluder
On Thu, Feb 9, 2012 at 8:01 AM, Gilles Celli gilles.ce...@ecgs.lu wrote: Hi, I searched the mailing-list but didn't find an answer….so sorry if this was posted before: I've setup a document based application which can read large ASCII data files (150MB). When opening the document the

Clipping a CAGradientLayer with a duplicated CAShapeLayer (don't)

2012-02-09 Thread Fritz Anderson
I was almost on the point of asking about this, but I found a solution, and I wanted to put it into Google in case anyone else runs into it. I had a CAShapeLayer that I had simply filled with a flat color. I decided to try for a gradient fill because Everything is Better with Gradients.

Re: Clipping a CAGradientLayer with a duplicated CAShapeLayer (don't)

2012-02-09 Thread Kyle Sluder
On Thu, Feb 9, 2012 at 11:09 AM, Fritz Anderson fri...@manoverboard.org wrote: * Create a duplicate CAShapeLayer (maskL) with [[CAShapeLayer alloc] initWithLayer: shapeL].        - Adjust the fill color to blackColor, because masking goes by alpha. The CALayer documentation makes it quite

Re: Clipping a CAGradientLayer with a duplicated CAShapeLayer (don't)

2012-02-09 Thread David Duncan
On Feb 9, 2012, at 11:09 AM, Fritz Anderson wrote: The trick was that -initWithLayer: did not produce a usable mask layer. Applications should not call -initWithLayer:. Its purpose of existence is so that if you have a CALayer subclass that has additional ivars that need copying, you can

Re: How to cancel a loading document in NSDocument's readFromURL:ofType:error method ?

2012-02-09 Thread Gilles Celli
Mike, Kyle, Thanks for the quick answers! Yes I'm targeting Mac OS X 10.6 and later so canConcurrentlyReadDocumentsOfType: is a welcome addition, I completely forgot that. Strangely if I put the method canConcurrentlyReadDocumentsOfType: inside my NSDocument I get a warning when trying to

Odd behavior of NSItemReplacementDirectory

2012-02-09 Thread Jens Alfke
The behavior of NSItemReplacementDirectory is contrary to the docs and sort of suboptimal. Am I missing something or are the docs just wrong? (1) The docs say the ‘appropriateForURL’ parameter is a directory inside of which you want to create a unique temporary directory”. However, that isn’t

Re: Can I somehow encourage the deallocation of a dismissed view controller?

2012-02-09 Thread G S
I have a breakpoint in the problematic object's dealloc method, and it is never called when I'm testing it, even when I know that the parent has been deallocated. Conveniently, the deallocation of the control only occurs when the phone is running untethered (not under the debugger). It's

Re: Clipping a CAGradientLayer with a duplicated CAShapeLayer (don't)

2012-02-09 Thread Fritz Anderson
On 9 Feb 2012, at 1:25 PM, Kyle Sluder wrote: The CALayer documentation makes it quite clear that you should never, ever do this: Hence the last word of the subject of this thread. — F ___ Cocoa-dev mailing list

Re: Can I somehow encourage the deallocation of a dismissed view controller?

2012-02-09 Thread G S
Made an interesting discovery. If I invoke a screen modally over the problematic one, simulate a low-memory warning, and then dismiss the modal screen... the control gets deallocated. After several attempts it will crash with a bad access (apparently at calling [super dealloc]). Anyway, this is

Re: Clipping a CAGradientLayer with a duplicated CAShapeLayer (don't)

2012-02-09 Thread David Duncan
On Feb 9, 2012, at 1:37 PM, Fritz Anderson wrote: On 9 Feb 2012, at 1:25 PM, Kyle Sluder wrote: The CALayer documentation makes it quite clear that you should never, ever do this: Hence the last word of the subject of this thread. Perhaps, but I believe that our point is that

Re: Clipping a CAGradientLayer with a duplicated CAShapeLayer (don't)

2012-02-09 Thread Fritz Anderson
On 9 Feb 2012, at 4:30 PM, David Duncan wrote: Perhaps, but I believe that our point is that -initWithLayer: is not a method to use to duplicate a layer, its a method to create a shadow layer (which is something strictly for Core Animation's usage). If you duplicated a layer (by calling

Re: drawing 1 bit images, and image resolution

2012-02-09 Thread Graham Cox
On 10/02/2012, at 3:54 AM, Chris Paveglio wrote: still looking for a way to convert to 1-bit. So what have you tried? There are a lot of different methods for deciding how to threshold an image - in other words how to decide which colours end up as 1s and which as 0s. You will probably

Re: How to cancel a loading document in NSDocument's readFromURL:ofType:error method ?

2012-02-09 Thread Mike Abdullah
On 9 Feb 2012, at 20:23, Gilles Celli wrote: Mike, Kyle, Thanks for the quick answers! Yes I'm targeting Mac OS X 10.6 and later so canConcurrentlyReadDocumentsOfType: is a welcome addition, I completely forgot that. Strangely if I put the method canConcurrentlyReadDocumentsOfType:

Re: Clipping a CAGradientLayer with a duplicated CAShapeLayer (don't)

2012-02-09 Thread David Duncan
On Feb 9, 2012, at 2:36 PM, Fritz Anderson wrote: On 9 Feb 2012, at 1:09 PM, Fritz Anderson wrote: The trick was that -initWithLayer: did not produce a usable mask layer. If I created maskL as a new mask layer ([CAShapeLayer layer]), and initialized it to match shapeL (except for the

Re: How to cancel a loading document in NSDocument's readFromURL:ofType:error method ?

2012-02-09 Thread Jeffrey Oleander
From: Gilles Celli gilles.ce...@ecgs.lu Subject: Re: How to cancel a loading document in NSDocument's readFromURL:ofType:error method ? To: Kyle Sluder kyle.slu...@gmail.com, Mike Abdullah cocoa...@mikeabdullah.net Cc: cocoa-dev@lists.apple.com Date: Thursday, 2012 February 9, 14:23

Re: How to cancel a loading document in NSDocument's readFromURL:ofType:error method ?

2012-02-09 Thread Kyle Sluder
On Feb 9, 2012, at 7:08 PM, Jeffrey Oleander jgo...@yahoo.com wrote: I don't get it. I though with OS X one of the great benefits was finally having pre-emptive multi-processing instead of co-operative multi-processing. Sure, when the user clicks Cancel it's an event, it gets stuffed

Re: Odd behavior of NSItemReplacementDirectory

2012-02-09 Thread Ken Thomases
On Feb 9, 2012, at 2:38 PM, Jens Alfke wrote: The behavior of NSItemReplacementDirectory is contrary to the docs and sort of suboptimal. Am I missing something or are the docs just wrong? (1) The docs say the ‘appropriateForURL’ parameter is a directory inside of which you want to create