Help with bundle help
Help with bundle help
- Subject: Help with bundle help
- From: John Timmer <email@hidden>
- Date: Mon, 05 Apr 2004 21:23:21 -0400
I'd like to put a help file in a plugin for another app. From my
understanding of things, the following code should do it:
FSRef myBundleRef;
OSStatus err = noErr;
NSBundle *myBundle = [NSBundle bundleForClass: [self class]];
NSURL *myBundleURL = [NSURL fileURLWithPath: [myBundle
bundlePath]];
if (!CFURLGetFSRef(myBundleURL, &myBundleRef)) err = fnfErr;
if (err == noErr) err = AHRegisterHelpBook(&myBundleRef);
// disable help button
if (err != noErr)
[[[theWindow contentView] viewWithTag: 501]
removeFromSuperview];
Unfortunately, it looks like AHRegisterHelpBook requires that I hook the
plugin into Carbon as well. Is there any way to handle this from Cocoa?
While we're at it, does this code look right?
Thanks,
John
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.