Implementing Help
-
Hi,
I have been trying and trying and for the life of me can not figure
out how to implement help in a cocoa application. I have tried
following several tutorials such as http://cocoadevcentral.com/
articles/000072.php, however I have not been successful.
Does any one know of a good tutorial, or some sample code (most
prefered) or has any tips on how to implement an html help system for
a cocoa application?
Cheers
-Nik -
on 06/04/08 07:42, Nik Youdale at <nik.youdale...> wrote:
> I have been trying and trying and for the life of me can not figure
> out how to implement help in a cocoa application....
> ...has any tips on how to implement an html help system for
> a cocoa application?
Getting Apple Help to work requires several things to be set in your app,
your package, and your Help .html files. If any one of these things are
wrong, Apple Help "just doesn't work". You get no error messages, no clues
and it is very frustrating. You just have to keep checking everything out
until you find the problem. Keep trying with an open mind you will get it!
Some common pitfalls....
Info.plist must have a CFBundleHelpBookFolder string key with the name of
the Help Book folder that is in your app's Resources folder.
That folder must have ONLY ONE file with this tag in its <head>:
<META NAME="AppleTitle" content="My App's Help"
HTTP-EQUIV="Content-Style-Type">
"My App's Help" can be any name you want.
What makes this even more difficult is that sometimes, after you find and
fix the problem, Apple Help Viewer will not recognize the fix because it may
have cached the broken data somewhere and still be using it. So, if you're
SURE everything is correct and are at your wit's end, try my Bigger Hammer
Apple Help Viewer Reset Procedure:
1. Quit Apple Help Viewer.
2. Delete these two files:
~/Library/Preferences/com.apple.help
~/Library/Preferences/com.apple.helpviewer
3. Delete this folder:
~/Library/Caches/com.apple.helpui
4. To improve the likelihood of this working, log out, and to improve it
even more, restart your Macintosh. -
Try http://www.andymatuschak.org/articles/2005/12/18/help-with-apple-
help for template files etc...
volker -
Am 08.04.2006 um 16:42 schrieb Nik Youdale:
> I have been trying and trying and for the life of me can not figure
> out how to implement help in a cocoa application. I have tried
> following several tutorials such as http://cocoadevcentral.com/
> articles/000072.php, however I have not been successful.
>
> Does any one know of a good tutorial, or some sample code (most
> prefered) or has any tips on how to implement an html help system
> for a cocoa application?
Well, it should just work the way the CocoaDevCentral text says it
does. You create the HTML files, make sure they look decent in Safari
(or if you need pre-Safari 10.2 support, HTMLRenderingLib, but you
really want Safari and 10.2.8 there...). Then you add two keys to
your dictionary and the "Help" menu should just work.
Can you tell us exactly what you did? Not by pointing to CDC, but by
actually writing down the steps as you try to perform them another
time, in your own words, including file and window names. Also, what
part has "not been successful"? Do you get any errors on the console?
Do you get an empty help viewer? Do you get the dialog saying "help
is not available"? What? If you don't tell us in more detail what's
not working, we can't help you figure out what the actual issue may be.
Cheers,
-- M. Uli Kusterer
http://www.zathras.de -
It's working now... I don't know what was wrong, because I followed
the same steps to implement help in a new app and it works fine. Then
I went back to my other app, and implemented it, and it worked to. I
must have missed something small, or not copied the files properly.
- Nik -
Am 08.04.2006 um 17:12 schrieb Jerry Krinock:
> on 06/04/08 07:42, Nik Youdale at <nik.youdale...> wrote:
>
>> I have been trying and trying and for the life of me can not figure
>> out how to implement help in a cocoa application....
>
>> ...has any tips on how to implement an html help system for
>> a cocoa application?
>
> Getting Apple Help to work requires several things to be set in
> your app,
> your package, and your Help .html files. If any one of these
> things are
> wrong, Apple Help "just doesn't work".
What he said. With a cherry on top.
> What makes this even more difficult is that sometimes, after you
> find and
> fix the problem, Apple Help Viewer will not recognize the fix
> because it may
> have cached the broken data somewhere and still be using it. So,
> if you're
> SURE everything is correct and are at your wit's end, try my Bigger
> Hammer
> Apple Help Viewer Reset Procedure:
Or, alternately, it may just help to go and do a "clean" (or, to
make Wolf happy "clean all") on your application and then build a
fresh copy. That usually helps making Finder and Launch Services re-
scan the app. Sometimes you also have to duplicate the app and launch
the copy because then it has a different path and Help Viewer will re-
register it.
Or you just light a candle in the church... that's also helped me
occasionally.
Cheers,
-- M. Uli Kusterer
http://www.zathras.de


