Re: Help Viewer can't open localized help - similar problem!!
Re: Help Viewer can't open localized help - similar problem!!
- Subject: Re: Help Viewer can't open localized help - similar problem!!
- From: Jerry Krinock <email@hidden>
- Date: Sat, 31 Jan 2004 17:57:57 -0800
on 04/01/29 08:42, Simon Bovet at email@hidden wrote:
>
Solved: I forgot to add the correct CFBundleHelpBookName string in the
>
localized InfoPlist.strings so that it matches the <meta
>
name="AppleTitle"> value of the HTML index file.
I was hoping that this would answer the problem I've been hacking on all
afternoon, but unfortunately it does not. Help is available in three places
in my application:
1. The default "SafariSorter Help" in the Help menu which operates via the
action which is "built in" to Cocoa.
2. A second item in the Help menu, connected through an IBAction to a
convoluted function (see below *) I adapted from the Apple's developer docs,
eventually using AHGoToPage().
3. A Help Button in which operates in the same way.
All of them worked reliably in my version 1.0, which I released 2 weeks ago.
But, while revising the Help and rebuilding to version 1.1 today, I broke
something. All three of them now give an empty, untitled Help Viewer
window, and my application does not show up in the Help Viewer's "Library"
menu. I see this problem on two different computers. But if I run my old
version 1.0, all three Helps still works fine.
Can anyone venture a guess as to how I broke this?
In the <dict> of my Info.plist, I have:
<key>CFBundleHelpBookFolder</key>
<string>Documentation</string>
<key>CFBundleHelpBookName</key>
<string>SafariSorter Help</string>
and in my package, I have the file:
Contents/Resources/English.lproj/Documentation/Documentation.html
and that file begins with:
<html>
<head>
<meta NAME="AppleTitle" content="SafariSorter Help">
</head>
<body>
....
which is exactly the same structure I have in version 1.0 of my application.
As you can see the CFBundleHelplBookName is the same as the meta NAME
"AppleTitle" in the file whose name is CFBundelHelpBookFolder.
THANKS,
Jerry Krinock
San Jose, CA USA
(*) Here is one of those convoluted functions:
- (IBAction)helpPrefs:(id)sender
{
CFBundleRef myApplicationBundle = NULL;
CFStringRef myBookName = NULL;
myApplicationBundle = CFBundleGetMainBundle();
myBookName = (CFStringRef)CFBundleGetValueForInfoDictionaryKey(
myApplicationBundle,
CFSTR("CFBundleHelpBookName"));
if (CFGetTypeID(myBookName) == CFStringGetTypeID())
AHGotoPage (myBookName, CFSTR("Preferences.html"), NULL);
}
_______________________________________________
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.