bugGNUstep - Bugs: bug #31153, [Foundation] NSURL problem with...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #31153: [Foundation] NSURL problem with URLWithString relativeToURL

Submitted by:  Riccardo Mottola <rmottola>
Submitted on:  Tue 28 Sep 2010 02:27:22 PM UTC  
 
Category: Base/FoundationSeverity: 3 - Normal
Item Group: NoneStatus: Fixed
Privacy: PublicAssigned to: None
Open/Closed: Closed

Fri 01 Oct 2010 08:16:19 AM UTC, comment #1:

Thanks ... should be fixed in svn now ... please give it a try.

Richard Frith-Macdonald <CaS>
Project Member
Tue 28 Sep 2010 02:27:22 PM UTC, original submission:

given the following code snippet:

sourceURL = [NSURL URLWithString:@"file://localhost/System/Library/Documentation/Developer/Gui/Reference/index.html"];
NSLog(@"source url: %@", sourceURL);

link = @"NSApplication.html";
myURL = [NSURL URLWithString:link relativeToURL:sourceURL];
NSLog(@"with link %@, obtained URL: %@", link, myURL);

link = @"NSApplication.html#class$NSApplication";
myURL = [NSURL URLWithString:link relativeToURL:sourceURL];
NSLog(@"with link %@, obtained URL: %@", link, myURL);

with the simple link, the URL created will contain:
NSApplication.html -- file://localhost/System/Library/Documentation/Developer/Gui/Reference/index.html

with the link containing the anchor (# character) the created URL is nil. The created URL is still nil even if the $ part is moitted, so it is not part of the problem.

Riccardo Mottola <rmottola>
Project Member

 

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by CaS (Posted a comment)
  • -unavailable- added by rmottola (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 3 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Wed 06 Oct 2010 10:55:29 AM UTCrmottolaOpen/ClosedIn Test=>Closed
    Fri 01 Oct 2010 08:16:18 AM UTCCaSStatusNone=>Fixed
      Open/ClosedOpen=>In Test

    Back to the top


    Powered by Savane 3.1-cleanup1