[Pythonmac-SIG] Using AHRegisterHelpBook
kw at codebykevin.com
Sun May 3 22:59:22 CEST 2009
Don McGuire wrote:
> I am attempting to build an application that uses the built-in Apple Help
> system to display my html help files. I'm getting a Mac OS Error -50, which
> corresponds to "Error in user parameter list." Here's what I've done thus
> 1. Info.plist has the following entries:
> <string>MyAppName Help</string>
> My html files are in a directory called "help", and my top-level help doc
> has the Apple metatag "MyAppName Help".
> 2. In the initializing routine of my app, I have the following lines:
> from Carbon import AH
> app = os.path.dirname(os.path.dirname(sys.prefix))
> AH.AHRegisterHelpBook(app) #This line causes Mac OS Error -50
> The application is a wxpython gui and I'm using py2app to build it.
> Everything works like a champ, except for the help system.
> Thank you for your time,
I used to use this function in my Python apps, but moved away from it
after it became clear that the MacOS/Carbon bits were being deprecated.
I believe they have been removed altogether from 3.0.
Searching for AH.AHRegisterHelpBook() on codesearch.google.com yields
some useful hits. I based my code on some snippets used there (the
PythonIDE stuff, in particular).
Code by Kevin
More information about the Pythonmac-SIG