Re: Apple help
Adit Panchal <[email protected]>
| Newsgroups | gmane.comp.mobile.bitpim.devel |
|---|---|
| Message-ID | <[email protected]> |
On Jan 28, 2005, at 12:11, Roger Binns wrote:
> According to the doc that is all that is necessary to make a
> non-localized help book. To use it you can do the following:
>
> import Carbon.AH
> Carbon.AH.AHGotoPage(None, "file:///path/to/welcome.htm", None)
>
> That will correctly bring up the help. However the search function
> won't work, and it thinks the book title is (null). (So what exactly
> was the point of the meta tag above then? Why does it ignore the
> index it created?)
I got this working as well. I was able to put in keywords and a
description and recreated the index file. The indexing tool detected
the keywords and description fine, but when I searched the help, it
still did nothing. I believe this means that the help HAS to be
registered for the search to work properly - it's probably also the
reason that null is showing up, since it doesn't know what book to
search (kind of dumb if you ask me - the idx file is right there).
> Presumably some pieces are missing. Maybe you have to use the
> Carbon.AH.AHRegisterHelpBook function (I couldn't find any parameter
> that would not give an error). There is probably a property list file
> that should be somewhere although the online documentation doesn't say
> where (in that directory, in a parent directory, somewhere else?). It
> also doesn't say how to create a property list from the command line
> even if I knew where to put it, nor what it actually needs to contain.
The property list they speak of is set within the Info.plist that comes
with bundled applications. If I am not mistaken, this needs to be set
in the build script. I put this in but as you will read below, I never
got a chance to test it. So it seems that unfortunately, to tie in
standalone help without a bundle doesn't seem like a possibility.
> Note that I am trying to create a standalone non-localized help book
> that is not part of any other bundle or even of BitPim, and do so
> entirely from the command line.
Anyways, on trying to get this to work, I wanted to perform a build and
put the help inside. Unfortunately, I couldn't get the build script
working, even before playing around with the help. I have all of the
necessary libraries and running bp.py works without a hitch. Whenever I
use makedist.py or write my own setup script with py2app, I get the
following error. I tried to look online to see what it could be, but
after searching various malling-lists, there was only one case similar
to my error. The individual had mentioned that he had an image file in
his source directory that was causing problems. I could did build
superdoodle.py which comes with py2app, and that builds just perfectly.
Any clues? Maybe it is just my system.
Traceback (most recent call last):
File "makedist.py", line 430, in ?
macbuild()
File "makedist.py", line 409, in macbuild
setup( data_files = resources(), options = opts, app = app,
script_args = ("py2app",) )
File
"/System/Library/Frameworks/Python.framework/Versions/2.3/lib/
python2.3/distutils/core.py", line 149, in setup
dist.run_commands()
File
"/System/Library/Frameworks/Python.framework/Versions/2.3/lib/
python2.3/distutils/dist.py", line 907, in run_commands
self.run_command(cmd)
File
"/System/Library/Frameworks/Python.framework/Versions/2.3/lib/
python2.3/distutils/dist.py", line 927, in run_command
cmd_obj.run()
File "/purelib/py2app/py2app/build_app.py", line 281, in run
File "/purelib/py2app/py2app/build_app.py", line 366, in _run
File "/purelib/py2app/py2app/build_app.py", line 414, in run_normal
File "/purelib/py2app/py2app/build_app.py", line 329, in
get_modulefinder
File "/purelib/py2app/modulegraph/find_modules.py", line 241, in
find_modules
File "/purelib/py2app/modulegraph/find_modules.py", line 163, in
find_needed_modules
File "/purelib/py2app/modulegraph/modulegraph.py", line 236, in
run_script
File "/purelib/py2app/modulegraph/modulegraph.py", line 456, in
scan_code
File "/purelib/py2app/modulegraph/modulegraph.py", line 404, in
_safe_import_hook
File "/purelib/py2app/modulegraph/modulegraph.py", line 246, in
import_hook
File "/purelib/py2app/modulegraph/modulegraph.py", line 306, in
load_tail
File "/purelib/py2app/modulegraph/modulegraph.py", line 362, in
import_module
File "/purelib/py2app/modulegraph/modulegraph.py", line 397, in
load_module
File "/purelib/py2app/modulegraph/modulegraph.py", line 456, in
scan_code
File "/purelib/py2app/modulegraph/modulegraph.py", line 404, in
_safe_import_hook
File "/purelib/py2app/modulegraph/modulegraph.py", line 245, in
import_hook
File "/purelib/py2app/modulegraph/modulegraph.py", line 291, in
find_head_package
File "/purelib/py2app/modulegraph/modulegraph.py", line 362, in
import_module
File "/purelib/py2app/modulegraph/modulegraph.py", line 397, in
load_module
File "/purelib/py2app/modulegraph/modulegraph.py", line 456, in
scan_code
File "/purelib/py2app/modulegraph/modulegraph.py", line 404, in
_safe_import_hook
File "/purelib/py2app/modulegraph/modulegraph.py", line 245, in
import_hook
File "/purelib/py2app/modulegraph/modulegraph.py", line 284, in
find_head_package
File "/purelib/py2app/modulegraph/modulegraph.py", line 362, in
import_module
File "/purelib/py2app/modulegraph/modulegraph.py", line 376, in
load_module
TypeError: compile() expected string without null bytes
Thanks,
Adit
-------------------------------------------------------
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
Tool for open source databases. Create drag-&-drop reports. Save time
by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
Download a FREE copy at http://www.intelliview.com/go/osdn_nl