URL:
  <http://savannah.gnu.org/bugs/?31153>

                 Summary: [Foundation] NSURL problem with URLWithString
relativeToURL
                 Project: GNUstep
            Submitted by: rmottola
            Submitted on: mar 28 set 2010 14:27:22 GMT
                Category: Base/Foundation
                Severity: 3 - Normal
              Item Group: None
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any

    _______________________________________________________

Details:

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.





    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?31153>

_______________________________________________
  Messaggio inviato con/da Savannah
  http://savannah.gnu.org/


_______________________________________________
Bug-gnustep mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-gnustep

Reply via email to