[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [lmi] help implementation
From: |
Greg Chicares |
Subject: |
Re: [lmi] help implementation |
Date: |
Thu, 28 Feb 2008 21:25:40 +0000 |
User-agent: |
Thunderbird 2.0.0.9 (Windows/20071031) |
On 2008-02-27 21:38Z, Vaclav Slavik wrote:
>
> Below is a patch to add F1 support.
I think I've applied the patch successfully (adjusting manually
for the odd way some long lines came through), but I keep getting
Error
Unable to load help files '/opt/lmi/data/lmihelp.hhp'.
[file /lmi/src/lmi/main_wx.cpp, line 459]
Lmi_wx Error
Cannot open HTML help book: /opt/lmi/data/lmihelp.hhp
I'm quite sure I've copied both files
lmihelp.hhc
lmihelp.hhp
to the right place. I even added a test[1] that AFAICT proves it.
I also tried creating html files referenced by the help files:
/usr/bin[0]$cd /opt/lmi/data
/opt/lmi/data[0]$touch index.html
/opt/lmi/data[0]$touch doc1.htm
/opt/lmi/data[0]$touch doc2.htm
/opt/lmi/data[0]$touch doc3.htm
/opt/lmi/data[0]$touch doc4.htm
/opt/lmi/data[0]$touch doc5.htm
/opt/lmi/data[0]$ls -o *.hh*
-rwx------+ 1 chicares 996 Feb 28 20:11 lmihelp.hhc
-rwx------+ 1 chicares 365 Feb 28 20:44 lmihelp.hhp
and that's definitely the directory where all other lmi data
files reside.
I also tried suppressing this line
wxHelpProvider::Set(new(wx) wxSimpleHelpProvider);
that I had committed on 20080228T1731Z, and also tried changing
it to this
wxHelpProvider::Set(new(wx) wxHelpControllerHelpProvider);
but those things didn't work, either.
I ran the program under 'gdb', but observed no wx debug message.
I even tried
/opt/lmi/data[0]$u2d lmihelp.hhc lmihelp.hhp
in case CRLF line endings were necessary, but that didn't help.
If I comment out
if(!help_controller_->AddBook(path.string()))
and the error-reporting block it governs, then everything seems
to work fine. Let me cat the *.hh* files below[2] in case that's
of any use.
---------
[1] Experimentally call access() to ensure file exists
(this test always says "The help file is accessible."):
+ #include "platform_dependent.hpp" // access()
void Skeleton::InitHelp()
{
help_controller_ = new(wx) wxHtmlHelpController(wxHF_DEFAULT_STYLE,
frame_);
fs::path path(global_settings::instance().data_directory() /
"lmihelp.hhp");
+ if(access(path.string().c_str(), R_OK))
+ {
+ fatal_error()
+ << "File '"
+ << path.string()
+ << "' is required but could not be found. Try reinstalling."
+ << LMI_FLUSH
+ ;
+ }
+ else warning() << "The help file is accessible." << std::flush;
+
if(!help_controller_->AddBook(path.string()))
[2] Here are my *.hh* files:
/opt/lmi/data[0]$for z in *.hh*; do echo $z; cat $z; done;
lmihelp.hhc
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<HTML>
<HEAD>
<!-- Sitemap 1.0 -->
</HEAD><BODY>
<OBJECT type="text/site properties">
<param name="ImageType" value="Folder">
</OBJECT>
<UL>
<LI> <OBJECT type="text/sitemap">
<param name="Local" value="index.html">
<param name="Name" value="Contents">
</OBJECT>
<LI> <OBJECT type="text/sitemap">
<param name="Local" value="doc1.htm#intro">
<param name="Name" value="Introduction">
</OBJECT>
<UL> <LI> <OBJECT type="text/sitemap">
<param name="Local" value="doc2.htm#classes">
<param name="Name" value="Classes">
</OBJECT>
<LI> <OBJECT type="text/sitemap">
<param name="Local" value="doc3.htm#functions">
<param name="Name" value="Functions">
</OBJECT>
<LI> <OBJECT type="text/sitemap">
<param name="Local" value="doc4.htm#about">
<param name="Name" value="About">
</OBJECT>
</UL> <LI> <OBJECT type="text/sitemap">
<param name="Local" value="doc5.htm#chapter2">
<param name="Name" value="Chapter 2">
</OBJECT>
</UL>
lmihelp.hhp
[OPTIONS]
Compatibility=1.1 or later
Compiled file=lmihelp.chm
Contents file=lmihelp.hhc
Default Window=default
Default topic=index.html
Display compile progress=Yes
Full-text search=Yes
Language=0x809 English (United Kingdom)
Title=LMI Help
[WINDOWS]
default="LMI Help","lmihelp.hhc",,"index.html",,,,,,0x2420,,0x380e,,,,,0,,,0
[FILES]
index.html
[INFOTYPES]
/opt/lmi/data[0]$
- Re: [lmi] help implementation, (continued)
- Re: [lmi] help implementation, Greg Chicares, 2008/02/26
- Re[2]: [lmi] help implementation, Vadim Zeitlin, 2008/02/26
- Re[2]: [lmi] help implementation, Vadim Zeitlin, 2008/02/27
- Re: [lmi] help implementation, Greg Chicares, 2008/02/26
- Re: [lmi] help implementation, Vaclav Slavik, 2008/02/27
- Re: [lmi] help implementation, Greg Chicares, 2008/02/27
- Re: [lmi] help implementation, Vaclav Slavik, 2008/02/27
- Re: [lmi] help implementation,
Greg Chicares <=
- Re: [lmi] help implementation, Vaclav Slavik, 2008/02/28
- Re: [lmi] help implementation, Greg Chicares, 2008/02/28