Help! on Help :)

Public support forum for peer to peer support with related to the Visual Objects and Vulcan.NET products
Anonymous

Help! on Help :)

Post 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?
FFF
Posts: 1582
Joined: Fri Sep 25, 2015 4:52 pm
Location: Germany

Help! on Help :)

Post 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"
Regards
Karl
(on Win8.1/64, Xide32 2.20, X#2.20.0.3)
BiggyRat

Help! on Help :)

Post by BiggyRat »

Thanks Karl, tried with and without a space in the path, no difference at all.

CurPath() returns c:cavo28bin
FFF
Posts: 1582
Joined: Fri Sep 25, 2015 4:52 pm
Location: Germany

Help! on Help :)

Post 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.
Regards
Karl
(on Win8.1/64, Xide32 2.20, X#2.20.0.3)
Karl-Heinz
Posts: 774
Joined: Wed May 17, 2017 8:50 am
Location: Germany

Help! on Help :)

Post by Karl-Heinz »

Hi Jeff,

try the hard(coded) way:

oWINDOW:HelpDisplay := HelpDisplay{ "c:cavo28binBizMan.CHM" }

does it work now?

regards
Karl-Heinz
BiggyRat

Help! on Help :)

Post 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
User avatar
lumberjack
Posts: 727
Joined: Fri Sep 25, 2015 3:11 pm
Location: South Africa

Help! on Help :)

Post 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.
______________________
Johan Nel
Boshof, South Africa
TerryB1
Posts: 306
Joined: Wed Jan 03, 2018 11:58 am

Help! on Help :)

Post by TerryB1 »

A complete "shot in the dark" but try:

? GetCurPath() + "BizMan.CHM"

Terry
User avatar
robert
Posts: 4529
Joined: Fri Aug 21, 2015 10:57 am
Location: Netherlands

Help! on Help :)

Post by robert »

Jeff,

Did you try CurDir () ?

Robert
XSharp Development Team
The Netherlands
robert@xsharp.eu
Karl-Heinz
Posts: 774
Joined: Wed May 17, 2017 8:50 am
Location: Germany

Help! on Help :)

Post 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
Post Reply