• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
documentation path?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

documentation path?


  • Subject: documentation path?
  • From: PA <email@hidden>
  • Date: Wed, 5 Apr 2006 20:27:31 +0200

Hello,

Is there a reasonable way to programatically discover the location of a framework documentation?

For example, given a class, I can pretty confidently build a path to its header:

static NSString*	_DefaultHeaderPath = @"Headers";
static NSString*	_DefaultHeaderPathExtension = @"h";

NSBundle* aBundle = [NSBundle bundleForClass: [self reference]];
NSString* aPath = [[[[aBundle bundlePath] stringByAppendingPathComponent: _DefaultHeaderPath] stringByAppendingPathComponent: [self name]] stringByAppendingPathExtension: _DefaultHeaderPathExtension];

if ( [[NSFileManager defaultManager] fileExistsAtPath: aPath] == YES )
{
_headerPath = [aPath retain];
}


Not so long time ago, I could try the same approach to discover the documentation path as well:

static NSString* _DefaultDocumentationPath = @"English.lproj/Documentation/Reference/ObjC_classic/Classes";
static NSString* _DefaultDocumentationPathExtension = @"html";
static NSString* _DefaultDocumentationNameSuffix = @"ClassCluster";


NSBundle* aBundle = [NSBundle bundleForClass: [self reference]];
NSString* aPath = [[[[aBundle resourcePath] stringByAppendingPathComponent: _DefaultDocumentationPath] stringByAppendingPathComponent: [self name]] stringByAppendingPathExtension: _DefaultDocumentationPathExtension];

if ( [[NSFileManager defaultManager] fileExistsAtPath: aPath] == NO )
{
aPath = [[[[aBundle resourcePath] stringByAppendingPathComponent: _DefaultDocumentationPath] stringByAppendingPathComponent: [NSString stringWithFormat: @"%@%@", [self name], _DefaultDocumentationNameSuffix]] stringByAppendingPathExtension: _DefaultDocumentationPathExtension];


if ( [[NSFileManager defaultManager] fileExistsAtPath: aPath] == NO )
{
aPath = nil;
}
}


Unfortunately, today, the documentation seems to have been banned from the frameworks themselves and relegated to some random location under /Developer or such.

Is packaging documentations alongside frameworks not in fashion any more?

Is there an alternative way to discover where the documentation for a given class could be located?

TIA.

Cheers

--
PA, Onnay Equitursay
http://alt.textdrive.com/

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Prev by Date: documentation path?
  • Next by Date: Strange checkbox <-> edit field IB bug?
  • Previous by thread: Re: documentation path?
  • Next by thread: Strange checkbox <-> edit field IB bug?
  • Index(es):
    • Date
    • Thread