mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-23 00:41:02 +00:00
Documentation tweaks.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@21027 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
37a5768596
commit
71ce433dad
4 changed files with 25 additions and 8 deletions
|
@ -1,3 +1,10 @@
|
|||
2005-04-01 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* Source/NSBundle.m: Minor debug/warning log tweaks.
|
||||
* Headers/Foundation/NSBundle.h: Document differences between GNUstep
|
||||
and MacOS-X when initialising using a relative path.
|
||||
* Headers/NSString.h: Fix typo in comment.
|
||||
|
||||
2005-03-31 Adam Fedor <fedor@gnu.org>
|
||||
|
||||
* ANNOUNCE, NEWS, Documentation/news.texi,
|
||||
|
|
|
@ -171,11 +171,21 @@ GS_EXPORT NSString* const NSLoadedClasses;
|
|||
withVersion: (int)version;
|
||||
|
||||
/** <init />
|
||||
* Init the bundle for reading resources from path. path must be an
|
||||
* absolute path to a directory on disk. If path is nil or doesn't
|
||||
* exist, initWithPath: returns nil. If a bundle for that path
|
||||
* already existed, it is returned in place of the receiver (and the
|
||||
* receiver is deallocated).
|
||||
* Init the bundle for reading resources from path.<br />
|
||||
* The MacOS-X documentation says that the path must be a full path to
|
||||
* a directory on disk. However, it (in MacOS-X) version 10.3 at least)
|
||||
* actually accepts relative paths too.<br />
|
||||
* The GNUstep behavior is similar in that it accepts a relative path,
|
||||
* but GNUstep converts it to an absolute path by referring to the
|
||||
* current working directory when the is initialised, so an absolute
|
||||
* path is then used and a warning message is printed.<br />
|
||||
* On MacOS-X using a bundle initialised with a relative path will cause
|
||||
* a crash if the current working directory is changed between the point
|
||||
* at which the bundle was initialised and that at which it is used.<br />
|
||||
* If path is nil or can't be accessed, initWithPath: reallocates the
|
||||
* receiver and returns nil.<br />
|
||||
* If a bundle for that path already existed, it is returned in place
|
||||
* of the receiver (and the receiver is deallocated).
|
||||
*/
|
||||
- (id) initWithPath: (NSString*)path;
|
||||
|
||||
|
|
|
@ -461,7 +461,7 @@ enum {
|
|||
* @"//host/share/file" produces @"//host/share/"
|
||||
* @"//host/share/" produces @"/host/share/"
|
||||
* @"//host/share" produces @"/host/share"
|
||||
* <example>
|
||||
* </example>
|
||||
*/
|
||||
- (NSString*) stringByDeletingLastPathComponent;
|
||||
|
||||
|
|
|
@ -895,13 +895,13 @@ _bundle_load_callback(Class theClass, struct objc_category *theCategory)
|
|||
|
||||
if (!path || [path length] == 0)
|
||||
{
|
||||
NSLog(@"No path specified for bundle");
|
||||
NSDebugMLog(@"No path specified for bundle");
|
||||
[self dealloc];
|
||||
return nil;
|
||||
}
|
||||
if ([path isAbsolutePath] == NO)
|
||||
{
|
||||
NSLog(@"WARNING: NSBundle -initWithPath: requires absolute path names!");
|
||||
NSWarnMLog(@"NSBundle -initWithPath: requires absolute path names!");
|
||||
path = [[[NSFileManager defaultManager] currentDirectoryPath]
|
||||
stringByAppendingPathComponent: path];
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue