• 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
Help with Help (AHLookupAnchor)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Help with Help (AHLookupAnchor)


  • Subject: Help with Help (AHLookupAnchor)
  • From: Graham Cox <email@hidden>
  • Date: Wed, 1 Jul 2009 12:02:16 +1000

Hi all,

I'm trying to link help buttons in my app to topics in my help book.

I have a simple scheme where the (hidden) title of the button contains the anchor and I pass it to AHLookupAnchor. The help window opens as 'untitled' with a blank content, but AHLookupAnchor returns noErr (0). I have checked that the help book is indexed correctly and have verified that the anchors are listed using the Unarchiver tool and that the anchor I'm testing with is listed. Note that my help book shows up in the Help menu and can be opened from there and browsed normally.

Any other ideas on what I might be doing wrong?

Relevant code:

- (IBAction) showHelpItemWithTitleOfSender:(id) sender
{
CFBundleRef myApplicationBundle;
CFTypeRef myBookName;
OSStatus err = fnfErr;

myApplicationBundle = CFBundleGetMainBundle();
if ( myApplicationBundle )
{
myBookName = CFBundleGetValueForInfoDictionaryKey( myApplicationBundle, CFSTR("CFBundleHelpBookName"));

NSLog(@"request for help item (anchor): '%@' in help book: '%@'", [sender title], myBookName );

if ( myBookName && CFGetTypeID(myBookName) == CFStringGetTypeID())
{
err = AHLookupAnchor( myBookName, (CFStringRef)[sender title]);

NSLog(@"lookup complete, result = %d", err );
}
}

if( err != noErr )
NSBeep();
}



Log output:

2009-07-01 11:50:17.031 Ortelius[10371:10b] request for help item (anchor): 'Create Symbol' in help book: 'Ortelius Help'
2009-07-01 11:50:17.085 Ortelius[10371:10b] lookup complete, result = 0


Unarchiver plist dump showing anchors (relevant portion):

<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd ">
<plist version="1.0">
<dict>
<key>SKI_ANCHOR_DATA</key>
<dict>
<key>Create Symbol</key>
<array>
<string>/helptopics/lessons/Creating_New_Symbols.html</string>
</array>



thanks for any help,

--Graham

_______________________________________________

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


  • Prev by Date: Re: GC bug in NSFontManager?
  • Next by Date: Crash on wake from sleep
  • Previous by thread: Re: How Do I Statically Link to libcurl?
  • Next by thread: Crash on wake from sleep
  • Index(es):
    • Date
    • Thread