Page 1 of 3
Help! on Help :)
Posted: Sun Aug 25, 2019 6:57 am
by Anonymous
I've written a help file using Innovasys HelpStudio as recommended to me by another VO'er (not in this NG) and it looks and works great, but I cannot get it to load.
Here is my path:
c:cavo28bin; c:cavo28binInvoices; c:cavo28binBizMan HelpBizMan.CHM
If I copy the bold part of the path into file explorer, bang! Up it comes, yet VO says the file doesn't exist. Here's how I'm trying to implement it:
method HelpRequest(oHelpRequestEvent) class Clients
Local oWINDOW as ShellWindow
super:HelpRequest(oHelpRequestEvent)
//Put your changes here
oWINDOW := ShellWindow{self}
oWINDOW:HelpDisplay := HelpDisplay{GetCurPath() + "BizMan.CHM" }
oWINDOW:HelpDisplay:EnableHTMLHelp(true)
? File(GetCurPath() + "BizMan.CHM") <===== Returns.F.
? GetCurPath() + "BizMan.CHM"
return NIL
What am I missing please?
Help! on Help :)
Posted: Sun Aug 25, 2019 7:35 am
by FFF
Some thoughts:
What IS CurPath?
The path to BizMan has blanks, so wouldn't you need to enclose with "" ?
I doubt you should add the FILEname to the path, so try: c:cavo28bin; c:cavo28binInvoices; "c:cavo28binBizMan Help"
Help! on Help :)
Posted: Sun Aug 25, 2019 7:44 am
by BiggyRat
Thanks Karl, tried with and without a space in the path, no difference at all.
CurPath() returns c:cavo28bin
Help! on Help :)
Posted: Sun Aug 25, 2019 8:07 am
by FFF
So your SetPath, (if you have called this (?) didn't work.
What happens if you hardcode the fullpath in your display call?
You might try using Get/SetDefault (see hlp).
But, generally speaking, i wouldn't use this path juggling from within the app at all.
Put all necessary paths into an ini.file and fetch them from there.
Help! on Help :)
Posted: Sun Aug 25, 2019 8:10 am
by Karl-Heinz
Hi Jeff,
try the hard(coded) way:
oWINDOW:HelpDisplay := HelpDisplay{ "c:cavo28binBizMan.CHM" }
does it work now?
regards
Karl-Heinz
Help! on Help :)
Posted: Sun Aug 25, 2019 9:05 am
by BiggyRat
No, I'm afraid not Karl-Heinz:
This code:
method HelpRequest(oHelpRequestEvent) class Clients
Local oWINDOW as ShellWindow
super:HelpRequest(oHelpRequestEvent)
//Put your changes here
oWINDOW := ShellWindow{self}
oWINDOW:HelpDisplay := HelpDisplay{"c:cavo28binBizHelpBizMan.CHM" }
oWINDOW:HelpDisplay:EnableHTMLHelp(true)
? File(GetCurPath() + "BizMan.CHM")
? GetCurPath() + "BizMan.CHM"
? CurPath()
return NIL
Returns:
.F.
c:cavo28bin; c:cavo28binInvoices; c:cavo28binBizHelpBizMan.CHM
c:cavo28bin
Help! on Help :)
Posted: Sun Aug 25, 2019 9:16 am
by lumberjack
Jeff,
BiggyRat wrote:No, I'm afraid not Karl-Heinz:
This code:
Code: Select all
method HelpRequest(oHelpRequestEvent) class Clients
? File(GetCurPath() + "BizMan.CHM")
? GetCurPath() + "BizMan.CHM"
? CurPath()
return NIL
GetCurrPath() is a ENVIRONMENT VARIABLE "PATH" which will/can include multiple paths, Hence, File(GetCurPath() + "BizMan.CHM") will not return a valid file.
As suggested rather create an INI file and make an Item HelpPath=yourpathname and use that to get the path and HelpFile.
Help! on Help :)
Posted: Sun Aug 25, 2019 10:05 am
by TerryB1
A complete "shot in the dark" but try:
? GetCurPath() + "BizMan.CHM"
Terry
Help! on Help :)
Posted: Sun Aug 25, 2019 1:30 pm
by robert
Jeff,
Did you try CurDir () ?
Robert
Help! on Help :)
Posted: Sun Aug 25, 2019 4:02 pm
by Karl-Heinz
Hi Jeff,
I´ve looked at your code again and noticed at second sight that you´re trying to create a shellwindow in the ***Helprequest()*** Method !
Code: Select all
method HelpRequest(oHelpRequestEvent) class Clients
// Local oWINDOW as ShellWindow
super:HelpRequest(oHelpRequestEvent)
//Put your changes here
// oWINDOW := ShellWindow{self}
// oWINDOW:HelpDisplay := HelpDisplay{"c:cavo28binBizHelpBizMan.CHM" }
// oWINDOW:HelpDisplay:EnableHTMLHelp(true)
// ? File(GetCurPath() + "BizMan.CHM")
// ? GetCurPath() + "BizMan.CHM"
// ? CurPath()
return NIL
Deactivate the marked HelpRequest() lines and attach the chm in the start method of your app to your main window - isn ´t that a ShellWindow ?
Code: Select all
method Start() class yourapp
oYourShellWin:HelpDisplay := HelpDisplay { "c:cavo28binBizHelpBizMan.CHM" }
and check if EnableHTMLHelp(TRUE) returns true or false
oyourShellWin:EnableHTMLHelp(TRUE )
regards
Karl-Heinz