• 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
Re: Preference panes and Apple Help
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >Preference panes and Apple Help (From: Andrew White <email@hidden>)

  • Prev by Date: Re: [NSCursor] White Arrow?
  • Next by Date: Re: Modal dialog from a document-modal sheet
  • Previous by thread: Preference panes and Apple Help
  • Next by thread: Re: Preference panes and Apple Help
  • Index(es):
    • Date
    • Thread