bug-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


From: Riccardo mottola
Subject: [bug #31153] [Foundation] NSURL problem with URLWithString relativeToURL
Date: Tue, 28 Sep 2010 14:27:23 +0000
User-agent: Opera/9.80 (Windows NT 5.1; U; en-GB) Presto/2.6.30 Version/10.62

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/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]