FROM : glenn andreas
DATE : Thu Apr 28 23:33:40 2005
On Apr 28, 2005, at 3:41 PM, Jerry Krinock wrote:
> I have used some very nice applications that open their help in the
> default
> web browser instead of Apple's Help Viewer. I'm working on a rewrite
> of my
> app and I think I am going to use the default web browser also.
> Before I do
> so, I'd like to ask if anyone knows of some benefits of Apple's Help
> Viewer
> which I have overlooked.
>
Help Viewer can search your document base on user questions, and then
present a list of topics that match sorted by relevance, and can search
across help in multiple applications (allowing the user to discover
that maybe your program is the tool that they should be using instead)
- web browser can't.
Help Viewer is also the "officially approved way" to present help
context - if you use something else, your application will look "out of
place" (and any improvements in the help application won't be available
to your application either - for example, if Spotlight searches help
books, users will be able to use that to find answers, and it's less
likely that it will search through arbitrary HTML documents embedded in
your application (though we'll obviously know tomorrow)).
> 3. Assuming that you've already got the launch path of your app for
> other
> purposes, opening help in the default browser takes one (1) line of
> code:
>
> [[NSWorkspace sharedWorkspace] openURL:[NSURL...
>
> but opening a page in Help Viewer takes six (6) lines of messy code:
>
> #include <Carbon/Carbon.h>
> CFBundleRef myApplicationBundle = NULL;
> CFStringRef myBookName = NULL;
> myApplicationBundle = CFBundleGetMainBundle();
> myBookName =
> (CFStringRef)CFBundleGetValueForInfoDictionaryKey(myApplicationBundle,
> CFSTR("CFBundleHelpBookName"));
> if (CFGetTypeID(myBookName) == CFStringGetTypeID()) AHGotoPage
> (myBookName,
> CFSTR("MyHelp.html"), NULL);
>
One line:
[[NSApp sendAction: @selector(showHelp:) to: NULL from: self];
Alternately, you can open a specific anchor in your book:
[[NSHelpManager sharedHelpManager] openHelpAnchor: @"baseAnchor"
inBook: myBookName];
or automatically perform a search:
[[NSHelpManager sharedHelpManager] findString: @"some topic" inBook:
myBookName];
(and since book name can be another application's help, you can use
this to bring up topics covered in standard system help books)
Or even easier - in no lines, just use the default application NIB's
Help Menu with it's "Application Help" menu item.
Glenn Andreas <email_removed>
<http://www.gandreas.com/> oh my!
quadrium | build, mutate, evolve | images, textures, backgrounds, art
DATE : Thu Apr 28 23:33:40 2005
On Apr 28, 2005, at 3:41 PM, Jerry Krinock wrote:
> I have used some very nice applications that open their help in the
> default
> web browser instead of Apple's Help Viewer. I'm working on a rewrite
> of my
> app and I think I am going to use the default web browser also.
> Before I do
> so, I'd like to ask if anyone knows of some benefits of Apple's Help
> Viewer
> which I have overlooked.
>
Help Viewer can search your document base on user questions, and then
present a list of topics that match sorted by relevance, and can search
across help in multiple applications (allowing the user to discover
that maybe your program is the tool that they should be using instead)
- web browser can't.
Help Viewer is also the "officially approved way" to present help
context - if you use something else, your application will look "out of
place" (and any improvements in the help application won't be available
to your application either - for example, if Spotlight searches help
books, users will be able to use that to find answers, and it's less
likely that it will search through arbitrary HTML documents embedded in
your application (though we'll obviously know tomorrow)).
> 3. Assuming that you've already got the launch path of your app for
> other
> purposes, opening help in the default browser takes one (1) line of
> code:
>
> [[NSWorkspace sharedWorkspace] openURL:[NSURL...
>
> but opening a page in Help Viewer takes six (6) lines of messy code:
>
> #include <Carbon/Carbon.h>
> CFBundleRef myApplicationBundle = NULL;
> CFStringRef myBookName = NULL;
> myApplicationBundle = CFBundleGetMainBundle();
> myBookName =
> (CFStringRef)CFBundleGetValueForInfoDictionaryKey(myApplicationBundle,
> CFSTR("CFBundleHelpBookName"));
> if (CFGetTypeID(myBookName) == CFStringGetTypeID()) AHGotoPage
> (myBookName,
> CFSTR("MyHelp.html"), NULL);
>
One line:
[[NSApp sendAction: @selector(showHelp:) to: NULL from: self];
Alternately, you can open a specific anchor in your book:
[[NSHelpManager sharedHelpManager] openHelpAnchor: @"baseAnchor"
inBook: myBookName];
or automatically perform a search:
[[NSHelpManager sharedHelpManager] findString: @"some topic" inBook:
myBookName];
(and since book name can be another application's help, you can use
this to bring up topics covered in standard system help books)
Or even easier - in no lines, just use the default application NIB's
Help Menu with it's "Application Help" menu item.
Glenn Andreas <email_removed>
<http://www.gandreas.com/> oh my!
quadrium | build, mutate, evolve | images, textures, backgrounds, art
| Related mails | Author | Date |
|---|---|---|
| Jerry Krinock | Apr 28, 22:41 | |
| glenn andreas | Apr 28, 23:33 | |
| David P Henderson | Apr 29, 00:08 | |
| Matt Neuburg | Apr 29, 05:47 | |
| Jerry Krinock | Apr 30, 06:27 | |
| Dave Rehring | Apr 30, 08:19 | |
| James Spencer | Apr 30, 15:53 | |
| Michael Marmarou | Apr 30, 17:30 | |
| M. Uli Kusterer | May 1, 14:02 |






Cocoa mail archive

