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 :)
Help! on Help :)
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"
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"
Regards
Karl
(on Win8.1/64, Xide32 2.20, X#2.20.0.3)
Karl
(on Win8.1/64, Xide32 2.20, X#2.20.0.3)
Help! on Help :)
Thanks Karl, tried with and without a space in the path, no difference at all.
CurPath() returns c:cavo28bin
CurPath() returns c:cavo28bin
Help! on Help :)
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.
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.
Regards
Karl
(on Win8.1/64, Xide32 2.20, X#2.20.0.3)
Karl
(on Win8.1/64, Xide32 2.20, X#2.20.0.3)
-
- Posts: 774
- Joined: Wed May 17, 2017 8:50 am
- Location: Germany
Help! on Help :)
Hi Jeff,
try the hard(coded) way:
oWINDOW:HelpDisplay := HelpDisplay{ "c:cavo28binBizMan.CHM" }
does it work now?
regards
Karl-Heinz
try the hard(coded) way:
oWINDOW:HelpDisplay := HelpDisplay{ "c:cavo28binBizMan.CHM" }
does it work now?
regards
Karl-Heinz
Help! on Help :)
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
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
- lumberjack
- Posts: 727
- Joined: Fri Sep 25, 2015 3:11 pm
- Location: South Africa
Help! on Help :)
Jeff,
As suggested rather create an INI file and make an Item HelpPath=yourpathname and use that to get the path and HelpFile.
GetCurrPath() is a ENVIRONMENT VARIABLE "PATH" which will/can include multiple paths, Hence, File(GetCurPath() + "BizMan.CHM") will not return a valid file.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
As suggested rather create an INI file and make an Item HelpPath=yourpathname and use that to get the path and HelpFile.
______________________
Johan Nel
Boshof, South Africa
Johan Nel
Boshof, South Africa
Help! on Help :)
A complete "shot in the dark" but try:
? GetCurPath() + "BizMan.CHM"
Terry
? GetCurPath() + "BizMan.CHM"
Terry
Help! on Help :)
Jeff,
Did you try CurDir () ?
Robert
Did you try CurDir () ?
Robert
XSharp Development Team
The Netherlands
robert@xsharp.eu
The Netherlands
robert@xsharp.eu
-
- Posts: 774
- Joined: Wed May 17, 2017 8:50 am
- Location: Germany
Help! on Help :)
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 !
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 ?
regards
Karl-Heinz
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
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 )
Karl-Heinz