Re: how to clip inside a path

2012-10-29 Thread Vincent Habchi
On 30 oct. 2012, at 01:24, Jens Alfke 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 thereof should

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

2012-10-29 Thread Quincey Morris
On Oct 29, 2012, at 22:24 , Rick Mann 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 have different rules.

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

2012-10-29 Thread Rick Mann
On Oct 29, 2012, at 12:56 , John McCall 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 ___

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 Moun

Re: how to clip inside a path

2012-10-29 Thread Jens Alfke
On Oct 29, 2012, at 4:11 PM, Graham Cox 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 it devolved into a bu

Re: how to clip inside a path

2012-10-29 Thread Graham Cox
On 30/10/2012, at 10:04 AM, Corbin Dunn 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 > names. Wel

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 wrote: > I have the following method in a category on NSBezierPath, w

Re: how to clip inside a path

2012-10-29 Thread Corbin Dunn
On Oct 29, 2012, at 3:47 PM, Graham Cox 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 classes (like NSBezi

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 t

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 wrote: > You can use a temporary, as Ken suggests. Alternatively, in this case it's > safe

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: 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 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 > paramete

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: 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" wrote: > On Mon, Oct 29, 2012 at 12:49 PM, Martin Hewitson > 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.

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 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: com.apple.security.temporary-exception

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 _bridging

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 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. >> >> Anybody

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: 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 & and ' need to be translated. Strange. I was sure I saw other escapes around on some contents bef

Re: zlib, objective-zip, NSDataCategory

2012-10-29 Thread Kyle Sluder
On Oct 25, 2012, at 3:01 PM, Michael Brian Bentley 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 cocoadev.com's NSDataCatego

Re: zlib, objective-zip, NSDataCategory

2012-10-29 Thread Jens Alfke
On Oct 25, 2012, at 3:01 PM, Michael Brian Bentley 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 NSDataCategory at > h

Re: zlib, objective-zip, NSDataCategory

2012-10-29 Thread William Sumner
On Oct 25, 2012, at 4:01 PM, Michael Brian Bentley 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 cocoadev.com's NSDataCatego

Re: how to clip inside a path

2012-10-29 Thread Roland King
On 29 Oct, 2012, at 11:43 PM, Ken Thomases 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 simple and doesn't

Re: UITextField adjustsFontSizeToFitWidth doesn't work?

2012-10-29 Thread Matt Neuburg
On Tue, 16 Oct 2012 23:14:44 -0700, Laurent Daudelin 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 textfield to 13, >minimum

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 ci

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

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 compat

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 said: >On Sun, 30 Sep 2012 10:03:33 -0500,

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: how to clip inside a path

2012-10-29 Thread Roland King
On 29 Oct, 2012, at 10:38 PM, Vincent Habchi wrote: > Le 29 oct. 2012 à 15:26, Roland King 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 dependin

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 t

Re: ARC question

2012-10-29 Thread Vincent Habchi
Le 29 oct. 2012 à 15:30, glenn andreas 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 to address

Re: how to clip inside a path

2012-10-29 Thread Vincent Habchi
Le 29 oct. 2012 à 15:26, Roland King 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 > way so that'

Re: ARC question

2012-10-29 Thread glenn andreas
On Oct 29, 2012, at 8:34 AM, Mike Abdullah wrote: > > On 29 Oct 2012, at 11:44, Vincent Habchi wrote: > >> Le 29 oct. 2012 à 12:34, Mike Abdullah 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 sinc

Re: how to clip inside a path

2012-10-29 Thread Roland King
On 29 Oct, 2012, at 9:29 PM, Kyle Sluder 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 and doesn't

Re: ARC question

2012-10-29 Thread Vincent Habchi
Le 29 oct. 2012 à 15:00, Kyle Sluder a écrit : > On Oct 29, 2012, at 6:55 AM, Vincent Habchi wrote: > > Actually, it's not. From the docs: > >> Note: Currently, only the standard predefined entities are supported; >> passing NULL for entitiesDictionary is sufficient. > > This kind of thing

Re: ARC question

2012-10-29 Thread Kyle Sluder
On Oct 29, 2012, at 6:55 AM, Vincent Habchi wrote: > Le 29 oct. 2012 à 14:34, Mike Abdullah 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 sh

Re: ARC question

2012-10-29 Thread Vincent Habchi
Le 29 oct. 2012 à 14:34, Mike Abdullah 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 around. I wasn’t awar

Re: ARC question

2012-10-29 Thread Mike Abdullah
On 29 Oct 2012, at 11:44, Vincent Habchi wrote: > Le 29 oct. 2012 à 12:34, Mike Abdullah 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 writi

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 12:01, Vincent Habchi wrote: > Le 29 oct. 2012 à 12:53, Roland King 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, CFURLCreateStringBy

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: createDirectoryAtPath:withIntermediateDirectories:attributes:error: Returns NO when it exists

2012-10-29 Thread Vincent Habchi
Le 29 oct. 2012 à 13:23, Andreas Grosam 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 (Cocoa-dev@lists.apple.com)

Re: Sandbox, security bookmarks and trash

2012-10-29 Thread Simone Tellini
Il giorno 29/ott/2012, alle ore 12:55, Mike Abdullah 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 rather like the ap

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 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: >> >> NSFileM

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 wrote: > >> I'm attempting to create a directory with NSFileManager's method. The >> directory may already exist. >> >> According the documentation >>

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 com.apple.security.scripting-targets com.ap

Re: ARC question

2012-10-29 Thread Vincent Habchi
Le 29 oct. 2012 à 12:53, Roland King 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 for % in U

Re: Sandbox, security bookmarks and trash

2012-10-29 Thread Mike Abdullah
On 27 Oct 2012, at 12:07, Simone Tellini 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. "~/Documents/exporteddata.xml"). The

Re: ARC question

2012-10-29 Thread Roland King
On 29 Oct, 2012, at 7:44 PM, Vincent Habchi wrote: > Le 29 oct. 2012 à 12:34, Mike Abdullah 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 wr

Re: ARC question

2012-10-29 Thread Vincent Habchi
Le 29 oct. 2012 à 12:34, Mike Abdullah 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 over performance (this is

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 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 Mike Abdullah
On 29 Oct 2012, at 10:06, Vincent Habchi 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 that): I ne

Re: More NSFileManager Issues

2012-10-29 Thread Mike Abdullah
On 29 Oct 2012, at 09:56, Andreas Grosam 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]; >NSLo

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 a écrit : > >> With NSFileManager I've created a file in the temporary directory. >> Attempting to delete it, fails: >> >> NSFileManager* fm = [[NSFileManager alloc] init];

Re: More NSFileManager Issues

2012-10-29 Thread Vincent Habchi
Since I am here… Le 29 oct. 2012 à 10:56, Andreas Grosam 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: %@", [_input1000 path]); >

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

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 UTF

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 isDirecto

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 the method shall return YES if

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 NSDataCategory,

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: https://lis