Frustrated Implementing Apple Help

I’m beyond frustrated at this point and I’m not sure what else to do.

I have created a help book (with Rapidweaver, in case that matters) for my application. I have added the appropriate meta tags (). I have run the folder through Apple’s Help Indexer. I am using App Wrapper to create my final application bundle with all the extras (including help). It flags no critical errors. I have verified that the appropriate entries are in the Info.plist.

Yet, when I launch my application, under the Help Menu, there isn’t anything there except the one item that I put there as part of my application (basically acts as a link to my website). I CANNOT get “My Application Help” to appear in the Help menu, let alone actually open the help book in Mac OS X’s Help Center application.

My application is for Mac OS X 10.7.4 and up and shows the same lack of Help on all three major OS releases from 10.7 up.

I have done some extensive searching, but there is little documentation out there for adding Apple Help support to Xojo/Realbasic apps beyond “Make sure you have the right tags and your Info.plist is updated”. There is next to nothing regarding troubleshooting this.

I’m about to give up on this and say “BAH! User’s don’t need help!”, but I know that’s not the right answer…

Does anyone have any pointers they would be willing to share? Best would be a step-by-step tutorial.

Thank you for any help that you can provide.

Look in the app wrapper documentation. You need to add some code which creates the help menu item and hooks into your help pages.

Is this a Cocoa application or Carbon application?

Carbon adds this automagically, whereas with Cocoa you need to add some code to display the help pages.

The following code is from the App Wrapper Help topic, on adding help. Add a menu item and set this code in the menu handler’s action event.

[code]const CocoaLib = “Cocoa.framework”

declare function NSClassFromString lib CocoaLib (aClassName as CFStringRef) as Ptr
declare function NSSelectorFromString lib CocoaLib (aSelector as CFStringRef) as Ptr
declare function sharedApplication lib CocoaLib selector “sharedApplication” (class_id as Ptr) as Ptr
declare function sendAction lib CocoaLib selector “sendAction:to:from:” (id as Ptr, anAction as Ptr, aTarget as Ptr, sender as Ptr) as Boolean

return sendAction(sharedApplication(NSClassFromString(“NSApplication”)), NSSelectorFromString(“showHelp:”), nil, nil)[/code]

Okay. So, in my frustration, I ended up completely forgetting to check App Wrapper’s help! Hah!

Actually, I’m feeling pretty stupid at the moment…

THANK YOU Mike and Sam for your help! You guys rock!

You’re welcome.

Oh… and it’s a Cocoa application. I think part of my problem was that the previous version of this application was a Carbon application and the Help thing almost just worked automatically. I didn’t realize that there was more work when I converted to Cocoa.

[quote=60341:@Scott Crick]…
I have created a help book (with Rapidweaver, in case that matters) for my application. …[/quote]
How did you do this in Rapidweaver? Are you using a specific theme? Would you be willing to share that Rapidweaver project, so me (and others) could learn how to do the same?

I just started to learn Rapidweaver and my first goal would be to use it for creation of a Apple help book to my apps.

Nothing special. I’m using a very simple, free theme that I found online (No Theme) that doesn’t have a lot of design elements. I’m just adding the custom Help Book tags at the top of each page. Pretty simple, really.

Thanks! I came to the same conclusion to go with one of the ‘no theme’ themes. Now I still have figure out what those custom help book tags are, that you are mentioning. I’m about to dig into it here:
Help

To Sam Rawlands :

Mostly you find a solution for different problems, by using :
declare function … lib …
Where can I find a list of all these functions + an explanation of how and wherefore they can be used.

Antoon:
nearly ready to use: MacOSLib.

Apple Developer Documentation

Also: Windows Functionality Suite

Tx Emile

[quote=62175:@Oliver Osswald]Thanks! I came to the same conclusion to go with one of the ‘no theme’ themes. Now I still have figure out what those custom help book tags are, that you are mentioning. I’m about to dig into it here:
Help[/quote]

There are two important tags you need to implement. The first tag needs to be inserted in the header of the “Home” page (the page you want to be displayed when help is opened). This tag is:

<meta name="AppleTitle" content="Your Application Name Help" />

The easiest way to add this in RapidWeaver is using the Page Inspector. When your “Home” page is open in RapidWeaver, open the Page Inspector. Click on the “Header” button in the Inspector. Add a new Meta Tag. The name will be “AppleTitle” and the content will be “Your Application Name Help” (obviously replacing with the name of your application and without the quotes).

Then, on each page in your Help Book, you need to add the other tag:

<a name="Page Name"></a>

There are different ways you can add this to each page. I have the Stacks plugin for RapidWeaver and I simply add a HTML element—in which I include this tag—to the top of each page. You can also simply type it at the top of each page (and the browser won’t show it as text, but still interpret it as HTML). I use the Stacks plugin for other reasons and so it’s no big deal for me to just include it there. You will need to replace the text “Page Name” with the name of each page.

Those are the main two tags. There are some other optional tags you can use for indexing and the like, but the two I described are required for your Help Book to work.

I hope this helps!

Thanks again, Scott! Your hint gives me a good jump-start!

[quote=62178:@Antoon Verleysen]To Sam Rawlands :

Mostly you find a solution for different problems, by using :
declare function … lib …
Where can I find a list of all these functions + an explanation of how and wherefore they can be used.[/quote]
Take at a look at the following forum post, where I’ve given a brief tutorial on how to do declare’s https://forum.xojo.com/5179-mac-os-custom-fonts

However, it require knowledge of the toolbox that you’re targeting. For instance on the Mac, you should be targeting Cocoa.

The other way to do it, is to use the MacOSLib or the MBS plugin, which is where both teams have trawled the Cocoa documentation and written Xojo code already.

Tx again Sam !
Now I have the place(s) where to find it !
And now taking the time to learn it using !

[quote=62348:@Antoon Verleysen]Tx again Sam !
Now I have the place(s) where to find it !
And now taking the time to learn it using ![/quote]
You’re welcome - Enjoy :slight_smile: