unsubscribe

2012-10-29 Thread Sandra Davis
unsubscribe ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription:

zlib, objective-zip, NSDataCategory

2012-10-29 Thread Michael Brian Bentley
Hiya, I would like to work with zlib using preset dictionaries, and was searching around for a good place to start working with the library in objective c. I've been looking at Objective-Zip, and at cocoadev.com's NSDataCategory at http://cocoadev.com/wiki/NSDataCategory. For

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

2012-10-29 Thread Andreas Grosam
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/Reference/Reference.html the method shall return YES if

More NSFileManager Issues

2012-10-29 Thread Andreas Grosam
I do have even more weird issues with NSFileManager: With NSFileManager I've created a file in the temporary directory. Attempting to delete it, fails: NSFileManager* fm = [[NSFileManager alloc] init]; NSLog(@tmp file: %@, [_input1000 path]); BOOL

ARC question

2012-10-29 Thread Vincent Habchi
Hi folks, before aught else, all my thoughts to those of you in the Eastern coast that are preparing themselves for a bunch of bleak days… I’ve just a silly question (I know, I don’t post very often and I apologize for that): I need to convert a HTML style string, with “ escapes” to normal

Re: More NSFileManager Issues

2012-10-29 Thread Andreas Grosam
On 29.10.2012, at 10:56, Andreas Grosam wrote: The line if ([fm fileExistsAtPath:[_input1000 path] isDirectory:isDirectory] || isDirectory) { should read if ([fm fileExistsAtPath:[_input1000 path] isDirectory:isDirectory] !isDirectory) { of course. But the issue

Re: More NSFileManager Issues

2012-10-29 Thread Vincent Habchi
Since I am here… Le 29 oct. 2012 à 10:56, Andreas Grosam agro...@onlinehome.de a écrit : With NSFileManager I've created a file in the temporary directory. Attempting to delete it, fails: NSFileManager* fm = [[NSFileManager alloc] init]; NSLog(@tmp file: %@,

Re: More NSFileManager Issues

2012-10-29 Thread Andreas Grosam
On 29.10.2012, at 11:22, Vincent Habchi wrote: Since I am here… Le 29 oct. 2012 à 10:56, Andreas Grosam agro...@onlinehome.de a écrit : With NSFileManager I've created a file in the temporary directory. Attempting to delete it, fails: NSFileManager* fm = [[NSFileManager

Re: More NSFileManager Issues

2012-10-29 Thread Mike Abdullah
On 29 Oct 2012, at 09:56, Andreas Grosam agro...@onlinehome.de wrote: I do have even more weird issues with NSFileManager: With NSFileManager I've created a file in the temporary directory. Attempting to delete it, fails: NSFileManager* fm = [[NSFileManager alloc] init];

Re: ARC question

2012-10-29 Thread Mike Abdullah
On 29 Oct 2012, at 10:06, Vincent Habchi vi...@macports.org wrote: Hi folks, before aught else, all my thoughts to those of you in the Eastern coast that are preparing themselves for a bunch of bleak days… I’ve just a silly question (I know, I don’t post very often and I apologize for

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

2012-10-29 Thread Mike Abdullah
On 29 Oct 2012, at 09:22, Andreas Grosam agro...@onlinehome.de wrote: I'm attempting to create a directory with NSFileManager's method. The directory may already exist. According the documentation

Re: ARC question

2012-10-29 Thread Vincent Habchi
Le 29 oct. 2012 à 12:34, Mike Abdullah cocoa...@mikeabdullah.net a écrit : The code is a fairly inefficient to start with, but no, it's not going to leak. Thanks. I am aware of this, but since this code is going to be part of a didactic article on writing a WMS client, I emphasize clarity

Re: ARC question

2012-10-29 Thread Roland King
On 29 Oct, 2012, at 7:44 PM, Vincent Habchi vi...@macports.org wrote: Le 29 oct. 2012 à 12:34, Mike Abdullah cocoa...@mikeabdullah.net a écrit : The code is a fairly inefficient to start with, but no, it's not going to leak. Thanks. I am aware of this, but since this code is going to be

Re: Sandbox, security bookmarks and trash

2012-10-29 Thread Mike Abdullah
On 27 Oct 2012, at 12:07, Simone Tellini cocoa-...@tellini.info wrote: Hello, I need to handle an export function in a document-based application. When the user creates the document, he can also choose a couple of path where to save different exported results (e.g.

Re: ARC question

2012-10-29 Thread Vincent Habchi
Le 29 oct. 2012 à 12:53, Roland King r...@rols.org a écrit : Does CFURLCreateStringByReplacingPercentEscapes() not do this for you? I often use it going the other way from text to escaped text, not just for URLs. AFAIK, CFURLCreateStringByReplacingPercentEscapes() substitues special chars

Re: App rejection due to app-sandboxing invalid entitlement

2012-10-29 Thread Martin Hewitson
Humph. So now what do I do? I'd rather not use one of my DTS tickets for this, especially as I feel like this should be documented, but maybe I have no choice. Anybody have any other guesses why this entitlement entry might be wrong? Thanks, Martin keycom.apple.security.scripting-targets/key

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

2012-10-29 Thread Andreas Grosam
On 29.10.2012, at 12:43, Mike Abdullah wrote: On 29 Oct 2012, at 09:22, Andreas Grosam agro...@onlinehome.de wrote: I'm attempting to create a directory with NSFileManager's method. The directory may already exist. According the documentation

Re: More NSFileManager Issues

2012-10-29 Thread Andreas Grosam
On 29.10.2012, at 12:30, Mike Abdullah wrote: On 29 Oct 2012, at 09:56, Andreas Grosam agro...@onlinehome.de wrote: I do have even more weird issues with NSFileManager: With NSFileManager I've created a file in the temporary directory. Attempting to delete it, fails:

Re: Sandbox, security bookmarks and trash

2012-10-29 Thread Simone Tellini
Il giorno 29/ott/2012, alle ore 12:55, Mike Abdullah cocoa...@mikeabdullah.net ha scritto: Problem is, if the user moves one of those files to the trash, the next time the application resolves the security bookmark it will point to the deleted file (ie. something like .../.Trash/...). I'd

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

2012-10-29 Thread Vincent Habchi
Le 29 oct. 2012 à 13:23, Andreas Grosam agro...@onlinehome.de a écrit : T$ ls -al total 816 drwx-- 10 me staff 340 29 Okt 13:15 . Did you try with your . directory having permissions drwxr-xr-x? V. ___ Cocoa-dev mailing list

how to clip inside a path

2012-10-29 Thread Roland King
I have a graphics context and a path and I want to clip everything inside the path, ie not display it, and leave everything outside the path displayed. The path is simple and doesn't cross itself, for sake of example it may as well be a circle. If I start with a clip-free GC and set that circle

Re: ARC question

2012-10-29 Thread Mike Abdullah
On 29 Oct 2012, at 12:01, Vincent Habchi vi...@macports.org wrote: Le 29 oct. 2012 à 12:53, Roland King r...@rols.org a écrit : Does CFURLCreateStringByReplacingPercentEscapes() not do this for you? I often use it going the other way from text to escaped text, not just for URLs.

Re: how to clip inside a path

2012-10-29 Thread Kyle Sluder
On Mon, Oct 29, 2012, at 06:22 AM, Roland King wrote: I have a graphics context and a path and I want to clip everything inside the path, ie not display it, and leave everything outside the path displayed. The path is simple and doesn't cross itself, for sake of example it may as well be a

Re: ARC question

2012-10-29 Thread Mike Abdullah
On 29 Oct 2012, at 11:44, Vincent Habchi vi...@macports.org wrote: Le 29 oct. 2012 à 12:34, Mike Abdullah cocoa...@mikeabdullah.net a écrit : The code is a fairly inefficient to start with, but no, it's not going to leak. Thanks. I am aware of this, but since this code is going to be

Re: ARC question

2012-10-29 Thread Vincent Habchi
Le 29 oct. 2012 à 14:34, Mike Abdullah cocoa...@mikeabdullah.net a écrit : Well, you can ask CFXMLCreateStringByUnescapingEntities() to do this on OS X, although if I recall all the CFXML functions have now sadly been deprecated. The source code for it should still be available if you search

Re: ARC question

2012-10-29 Thread Kyle Sluder
On Oct 29, 2012, at 6:55 AM, Vincent Habchi vi...@macports.org wrote: Le 29 oct. 2012 à 14:34, Mike Abdullah cocoa...@mikeabdullah.net a écrit : Well, you can ask CFXMLCreateStringByUnescapingEntities() to do this on OS X, although if I recall all the CFXML functions have now sadly been

Re: ARC question

2012-10-29 Thread Vincent Habchi
Le 29 oct. 2012 à 15:00, Kyle Sluder k...@ksluder.com a écrit : On Oct 29, 2012, at 6:55 AM, Vincent Habchi vi...@macports.org wrote: Actually, it's not. From the docs: Note: Currently, only the standard predefined entities are supported; passing NULL for entitiesDictionary is

Re: how to clip inside a path

2012-10-29 Thread Roland King
On 29 Oct, 2012, at 9:29 PM, Kyle Sluder k...@ksluder.com wrote: On Mon, Oct 29, 2012, at 06:22 AM, Roland King wrote: I have a graphics context and a path and I want to clip everything inside the path, ie not display it, and leave everything outside the path displayed. The path is simple

Re: ARC question

2012-10-29 Thread glenn andreas
On Oct 29, 2012, at 8:34 AM, Mike Abdullah cocoa...@mikeabdullah.net wrote: On 29 Oct 2012, at 11:44, Vincent Habchi vi...@macports.org wrote: Le 29 oct. 2012 à 12:34, Mike Abdullah cocoa...@mikeabdullah.net a écrit : The code is a fairly inefficient to start with, but no, it's not

Re: how to clip inside a path

2012-10-29 Thread Vincent Habchi
Le 29 oct. 2012 à 15:26, Roland King r...@rols.org a écrit : Doesn't help I'm afraid. If I only have that one, single, path, the even-odd rule returns odd inside the path/circle so it's inside and the non-zero returns either 1 or -1 depending on the order of the control points so either

Re: ARC question

2012-10-29 Thread Vincent Habchi
Le 29 oct. 2012 à 15:30, glenn andreas gandr...@me.com a écrit : Given that there are also decimal (#DD;) and hexadecimal escape sequences (#x;) in HTML, trying to support those through the use of a dictionary of sequence - replacement is going to be impractical. Hopefully, I have only

Re: ARC question

2012-10-29 Thread Vincent Habchi
That’s blatant. […] I meant obvious. I just read the use of “blatant” for “obvious” was incorrect. My bad. Vincent ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact

Re: how to clip inside a path

2012-10-29 Thread Roland King
On 29 Oct, 2012, at 10:38 PM, Vincent Habchi vi...@macports.org wrote: Le 29 oct. 2012 à 15:26, Roland King r...@rols.org a écrit : Doesn't help I'm afraid. If I only have that one, single, path, the even-odd rule returns odd inside the path/circle so it's inside and the non-zero returns

Re: how to clip inside a path

2012-10-29 Thread Vincent Habchi
Roland, Someone suggested a clip mask, that might work if I can't get the paths to go; I feel for some reason that a clip mask would be less efficient and this should be totally do-able with paths and paths are what I naturally have here. I am not sure if would be less efficient. If I

Re: build compatibility for iOS

2012-10-29 Thread Matt Neuburg
Just to give an example: iOS 6 is drawing text slightly differently from iOS 5, and this is causing my existing code to misbehave when the app runs on iOS 6, even though it is compiled against iOS 5. m. On Thu, 04 Oct 2012 09:59:10 -0700, Matt Neuburg m...@tidbits.com said: On Sun, 30 Sep 2012

Re: iOS 6 changes in CATextLayer text drawing

2012-10-29 Thread Matt Neuburg
I've filed a bug on this, clearly demonstrating the problem (the very same code compiled against the very same SDK draws the text in a very different location); but it is obvious that nothing will be done about it. There are pervasive changes in text drawing throughout iOS 6, and backward

Re: ARC question

2012-10-29 Thread Mike Abdullah
On 29 Oct 2012, at 13:55, Vincent Habchi wrote: Le 29 oct. 2012 à 14:34, Mike Abdullah cocoa...@mikeabdullah.net a écrit : Well, you can ask CFXMLCreateStringByUnescapingEntities() to do this on OS X, although if I recall all the CFXML functions have now sadly been deprecated. The source

Re: how to clip inside a path

2012-10-29 Thread Ken Thomases
On Oct 29, 2012, at 8:22 AM, Roland King wrote: I have a graphics context and a path and I want to clip everything inside the path, ie not display it, and leave everything outside the path displayed. The path is simple and doesn't cross itself, for sake of example it may as well be a

Re: UITextField adjustsFontSizeToFitWidth doesn't work?

2012-10-29 Thread Matt Neuburg
On Tue, 16 Oct 2012 23:14:44 -0700, Laurent Daudelin laur...@nemesys-soft.com said: I just realized while doing some testing that all my UITextField won't reduce the font size if there is more text to display than what the frame can show. I programmatically set the regular font size of the

Re: how to clip inside a path

2012-10-29 Thread Roland King
On 29 Oct, 2012, at 11:43 PM, Ken Thomases k...@codeweavers.com wrote: On Oct 29, 2012, at 8:22 AM, Roland King wrote: I have a graphics context and a path and I want to clip everything inside the path, ie not display it, and leave everything outside the path displayed. The path is

Re: zlib, objective-zip, NSDataCategory

2012-10-29 Thread William Sumner
On Oct 25, 2012, at 4:01 PM, Michael Brian Bentley bent...@crenelle.com wrote: Hiya, I would like to work with zlib using preset dictionaries, and was searching around for a good place to start working with the library in objective c. I've been looking at Objective-Zip, and at

Re: zlib, objective-zip, NSDataCategory

2012-10-29 Thread Jens Alfke
On Oct 25, 2012, at 3:01 PM, Michael Brian Bentley bent...@crenelle.com wrote: I would like to work with zlib using preset dictionaries, and was searching around for a good place to start working with the library in objective c. I've been looking at Objective-Zip, and at cocoadev.com's

Re: zlib, objective-zip, NSDataCategory

2012-10-29 Thread Kyle Sluder
On Oct 25, 2012, at 3:01 PM, Michael Brian Bentley bent...@crenelle.com wrote: Hiya, I would like to work with zlib using preset dictionaries, and was searching around for a good place to start working with the library in objective c. I've been looking at Objective-Zip, and at

Re: ARC question

2012-10-29 Thread Vincent Habchi
Mike: How are those accented characters represented in your HTML? Thanks for pointing this. It turns out, after examination, that the accented chars are already provided in UTF-8, and that only amp; and apos; need to be translated. Strange. I was sure I saw other escapes around on some

Re: App rejection due to app-sandboxing invalid entitlement

2012-10-29 Thread Jayson Adams
On Oct 29, 2012, at 5:07 AM, Martin Hewitson wrote: Humph. So now what do I do? I'd rather not use one of my DTS tickets for this, especially as I feel like this should be documented, but maybe I have no choice. Anybody have any other guesses why this entitlement entry might be wrong?

Re: App rejection due to app-sandboxing invalid entitlement

2012-10-29 Thread Martin Hewitson
On 29, Oct, 2012, at 06:41 PM, Jayson Adams jay...@circusponies.com wrote: On Oct 29, 2012, at 5:07 AM, Martin Hewitson wrote: Humph. So now what do I do? I'd rather not use one of my DTS tickets for this, especially as I feel like this should be documented, but maybe I have no choice.

ARC conversion help - CFErrorRef* and NSError**

2012-10-29 Thread Alex Kac
ARC conversion is something we're having some issues with, but I won't bore you with the details. I'm trying to convert parts of our project to ARC and so of course there is a learning curve. Primarily between CF code and Cocoa. This one I'm stumped on as I'm just starting the CF/Cocoa

Re: App rejection due to app-sandboxing invalid entitlement

2012-10-29 Thread Stephen J. Butler
On Mon, Oct 29, 2012 at 12:49 PM, Martin Hewitson martin.hewit...@aei.mpg.de wrote: But com.apple.security.scripting-targets is not a temporary entitlement, is it? I thought this was the recommended way of communicating between apps in the new era. But this part clearly is:

Re: App rejection due to app-sandboxing invalid entitlement

2012-10-29 Thread Martin Hewitson
On 29, Oct, 2012, at 07:27 PM, Stephen J. Butler stephen.but...@gmail.com wrote: On Mon, Oct 29, 2012 at 12:49 PM, Martin Hewitson martin.hewit...@aei.mpg.de wrote: But com.apple.security.scripting-targets is not a temporary entitlement, is it? I thought this was the recommended way of

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

2012-10-29 Thread Ken Thomases
On Oct 29, 2012, at 1:15 PM, Alex Kac wrote: ARC conversion is something we're having some issues with, but I won't bore you with the details. I'm trying to convert parts of our project to ARC and so of course there is a learning curve. Primarily between CF code and Cocoa. This one I'm

Re: Warning message using stringWithContentsOfFile:encoding:error:

2012-10-29 Thread Lee Ann Rucker
On Oct 28, 2012, at 11:03 AM, Quincey Morris wrote: On Oct 28, 2012, at 10:37 , Kyle Sluder k...@ksluder.com wrote: No matter what you do, file a bug with the 3rd-party framework. Their macros should not leak. The thing that bothers me is why macros should be substituting into method

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

2012-10-29 Thread John McCall
On Oct 29, 2012, at 11:15 AM, Alex Kac wrote: ARC conversion is something we're having some issues with, but I won't bore you with the details. I'm trying to convert parts of our project to ARC and so of course there is a learning curve. Primarily between CF code and Cocoa. This one I'm

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

2012-10-29 Thread Alex Kac
Aha, that's really interesting to know that's allowed. This doesn't seem like its covered in the ARC docs at all, that I could see anyhow. I'll try that. Thanks! On Oct 29, 2012, at 2:56 PM, John McCall rjmcc...@apple.com wrote: You can use a temporary, as Ken suggests. Alternatively, in this

Re: how to clip inside a path

2012-10-29 Thread Graham Cox
I have the following method in a category on NSBezierPath, which seems to be what you want, and works in the same way as -addClip: - (void) addInverseClip // this is similar to -addClip, except that it excludes the area bounded by the path instead of includes it. It works by combining

Re: how to clip inside a path

2012-10-29 Thread Corbin Dunn
On Oct 29, 2012, at 3:47 PM, Graham Cox graham@bigpond.com wrote: I have the following method in a category on NSBezierPath, which seems to be what you want, and works in the same way as -addClip: - (void) addInverseClip Please don't add generic category names to standard appkit

Re: how to clip inside a path

2012-10-29 Thread Roland King
Thanks. That's the code I thought I'd written last night but clearly I hadn't because it wasn't working. I'll start fresh this evening instead of trying to jam it in badly like I was. On 30 Oct, 2012, at 6:47 AM, Graham Cox graham@bigpond.com wrote: I have the following method in a

Re: how to clip inside a path

2012-10-29 Thread Graham Cox
On 30/10/2012, at 10:04 AM, Corbin Dunn corb...@apple.com wrote: Please don't add generic category names to standard appkit classes (like NSBezierPath). This could easily conflict with potential names we add in the future. Either don't use a category, or use a unique prefix for your method

Re: how to clip inside a path

2012-10-29 Thread Jens Alfke
On Oct 29, 2012, at 4:11 PM, Graham Cox graham@bigpond.com wrote: When are we going to get namespaces and put an end to this very major shortcoming of Obj-C? 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

Re: App rejection due to app-sandboxing invalid entitlement

2012-10-29 Thread Martin Hewitson
In case anyone's interested, I tracked down my original source for these entitlement keys: I got this from the WWDC2012 video entitled The OS X App Sandbox. At time-stamp 39:48 they show a slide which details the new use of access groups and the recommended way of talking between apps in

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

2012-10-29 Thread Rick Mann
On Oct 29, 2012, at 12:56 , John McCall rjmcc...@apple.com wrote: and while ARC can't reasonably know that and so prevents the cast, Any way to introduce (into clang) an __attribute__ or something similar on the declaration of NSError to say it's equivalent to CFErrorRef? -- Rick