Re: Preference panes and Apple Help
Re: Preference panes and Apple Help
- Subject: Re: Preference panes and Apple Help
- From: Andrew White <email@hidden>
- Date: Wed, 03 Sep 2008 09:27:05 +1000
Thanks Gregory, that did the trick.
I actually didn't need your "step 2" (putting the anchors in the
Info.plist); using a helpindex worked fine on 10.4. But I did need to
explicitly register the help book.
Incidentally, I was able to shortcut the Apple example code slightly using
NSPreferencePane's 'bundle' method:
- (void) registerHelpBook
{
NSString * bundlePath = [[self bundle] bundlePath];
OSStatus err;
FSRef fsref;
err = FSPathMakeRef (
(const void *) [bundlePath UTF8String], & fsref, NULL
);
if (err != noErr)
{
NSLog (@"Could not get path for bundle - no Apple Help for myPrefPane\n");
return;
}
err = AHRegisterHelpBook (& fsref);
if (err != noErr)
{
NSLog (@"Could not register Apple Help for myPrefPane\n");
}
}
PS: I couldn't see any call to deallocate a FSRef. Does it get correctly
cleaned up as part of normal stack cleanup?
Not that a small memory leak here would be a big problem, since it's called
exactly once.
--
Andrew White
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden