Re: NSURL relativePath problem

2013-08-29 Thread Koen van der Drift
On Aug 29, 2013, at 2:22 PM, Paul Scott wrote: > FYI, If your use of test.com was purely for illustrative purposes, you should > use example.com instead. The domain example.com was established for that > purpose; the use of any other domain name for illustrative purposes could be > problemati

Re: NSURL relativePath problem

2013-08-29 Thread Paul Scott
On Aug 29, 2013, at 11:02 AM, Koen van der Drift wrote: > I'm having some difficulties constructing a URL from a baseURL and a > relativeURL when the relativeURL starts with a question mark: > >NSURL *baseURL = [NSURL URLWithString: @"http://www.test.com/test/";]; >NSString *relativeS

Re: NSURL relativePath problem

2013-08-29 Thread Koen van der Drift
On Aug 29, 2013, at 2:20 PM, Kyle Sluder wrote: > You're looking at the output of -[NSURL description], which remembers > whether the URL was created as an absolute or relative URL and prints > itself accordingly. Ok, that makes sense! Thanks, - Koen. ___

Re: NSURL relativePath problem

2013-08-29 Thread Kyle Sluder
On Thu, Aug 29, 2013, at 11:02 AM, Koen van der Drift wrote: > I'm having some difficulties constructing a URL from a baseURL and a > relativeURL when the relativeURL starts with a question mark: > > NSURL *baseURL = [NSURL URLWithString: @"http://www.test.com/test/";]; > NSString *relativ

Re: NSURL relativePath problem

2013-08-29 Thread Ken Thomases
On Aug 29, 2013, at 1:02 PM, Koen van der Drift wrote: > I'm having some difficulties constructing a URL from a baseURL and a > relativeURL when the relativeURL starts with a question mark: > >NSURL *baseURL = [NSURL URLWithString: @"http://www.test.com/test/";]; >NSString *relativeStrin

Re: NSURL relativePath problem

2013-08-29 Thread Alex Zavatone
Are you sure it's not the trailing forward slash on your root? FYI, the way that certain characters are encoded after a ? is different than how you would normally do it. Just in case you need to escape spaces within parameters, use a + after the ?. In any case, what we ended up doing was to bui

NSURL relativePath problem

2013-08-29 Thread Koen van der Drift
I'm having some difficulties constructing a URL from a baseURL and a relativeURL when the relativeURL starts with a question mark: NSURL *baseURL = [NSURL URLWithString: @"http://www.test.com/test/";]; NSString *relativeString = @"?query=test"; NSURL *url = [NSURL URLWithString: rela

Re: Creating CGFont from PDF Tf operator

2013-08-29 Thread Marcel Weiher
On Aug 28, 2013, at 16:02 , Graham Cox wrote: > It seems overall that I was right in that once you can get to a stream (font > file) or a name, you're home and dry. "Home and dry" might be overstating things a bit :-) You’re at the starting line. > CGFontCreateWithDataProvider obviously im

Re: validateUserInterfaceItem problem

2013-08-29 Thread Pax
Ah okay. Well that's easily fixed then (and has been). Thanks for your explanation. On 29 Aug 2013, at 14:42, Keary Suska wrote: > These two methods are implemented by NSWindow, and chances are the window is > gobbling up the actions because it is earlier in the responder chain: > https://

Re: validateUserInterfaceItem problem

2013-08-29 Thread Keary Suska
On Aug 29, 2013, at 6:38 AM, Pax wrote: > I've written some code to enable / disable the menu items of my NSDocument > based application, as appropriate. It works for methods that I've written > myself, but not (apparently) for ones that are provided for me. > > Here's the code (simplified sli

validateUserInterfaceItem problem

2013-08-29 Thread Pax
I've written some code to enable / disable the menu items of my NSDocument based application, as appropriate. It works for methods that I've written myself, but not (apparently) for ones that are provided for me. Here's the code (simplified slightly just to say return 'NO' - a quick test to se

Re: please help with this handler issue

2013-08-29 Thread Uli Kusterer
On Aug 29, 2013, at 5:18 AM, Rick C. wrote: > [request2 performRequestWithHandler:^(NSData *responseData, NSHTTPURLResponse > *urlResponse, NSError *error) { > >if (responseData) { > >NSDictionary *user = >[NSJSONSerialization JSONObjectWithData:responseData >

Re: How to fix warning?

2013-08-29 Thread Uli Kusterer
On Aug 28, 2013, at 10:26 PM, Dave wrote: > NSCharacterSet *stopCharacters = [NSCharacterSet > characterSetWithCharactersInString:[NSString stringWithFormat:@"< > \t\n\r%C%C%C%C", 0x0085, 0x000C, 0x2028, 0x2029]]; Well, the %C expects a unichar (which is defined as another name for an unsigned

Re: Experience with keyed archiving forward/backwards compatibility?

2013-08-29 Thread Graham Cox
On 29/08/2013, at 10:35 AM, Marcel Weiher wrote: >> Also, if you add a new class, the old application won't be able to >> de-serialize it from a keyed archiver. > > Hadn’t thought of that one! Er…I meant to say “completely obvious!!" You can plan ahead for this eventuality though. A keyed (

Re: How to fix warning?

2013-08-29 Thread Dave
On 29 Aug 2013, at 03:05, Stephen J. Butler wrote: > Are those really always constant? Why not: > > NSCharacterSet *stopCharacters = [NSCharacterSet > characterSetWithCharactersInString:@"< \t\n\r\x85\x0C\u2028\u2029"]; I've no idea what it is trying to do, it's in a third party library of a

Re: Experience with keyed archiving forward/backwards compatibility?

2013-08-29 Thread Marcel Weiher
Hi Uli, thanks for your in-depth response! On Aug 28, 2013, at 20:38 , Uli Kusterer wrote: > On Aug 28, 2013, at 4:53 PM, Marcel Weiher wrote: >> does anyone have practical experience with the forward/backward >> compatibility aspect of keyed archiving? That is define a file format using >>