Help! on Help :)
Help! on Help :)
Yes Robert I did, as I said to Karl earlier, CurPath() returns c:cavo28bin.
Meanwhile....
My Start() is
method Start() class App
//local oMainWindow as TopAppWindow
local oMainWindow as ShellWindow
Local cWorkDir, cPath as String
cPath := cWorkDir +", "+ cWorkDir+"Invoices" + ", "+ cWorkDir+"BizHelp"
SetPath(cPath)
oMainWindow := ShellWindow{self}
oMainWindow:HelpDisplay := HelpDisplay{"c:cavo28binBizHelpBizMan.CHM" }
oMainWindow:HelpDisplay:EnableHTMLHelp(true)
cWorkDir := WorkDir()
self:Initialize()
// oMainWindow := TopAppWindow{self}
oMainWindow := ShellWindow{self}
oMainWindow:Show(SHOWZOOMED)
oMainWindow:Caption := cAppVersion
VODBRddSetDefault("DBFCDX")
SetExclusive(FALSE)
SetDeleted(true)
oMainWindow:Icon := BM{}
oMainWindow:IconSm := BM{}
self:SetGlobalValues()
Run("FixOutlook2016.reg")
oMainWindow:EnableSystemMenu(FALSE)
SetNatDLL("BRITISH")
SetDateCountry ( BRITISH )
SetDateFormat("dd/MM/yyyy")
SetCentury(true)
SetAmPm(false)
SetThemeAppProperties(_or(STAP_ALLOW_NONCLIENT, STAP_ALLOW_CONTROLS, STAP_ALLOW_WEBCONTENT))
MainMenu{}:Show(SHOWCENTERED)
self:Exec()
Return self
Still makes no difference pressing the F1 key can bring up the QQout results, which means it's in the correct place I guess, but no actual help file is displayed.
BTW ? oMainWindow:HelpDisplay:EnableHTMLHelp(true)
returns NIL (after crashing the program)
Meanwhile....
My Start() is
method Start() class App
//local oMainWindow as TopAppWindow
local oMainWindow as ShellWindow
Local cWorkDir, cPath as String
cPath := cWorkDir +", "+ cWorkDir+"Invoices" + ", "+ cWorkDir+"BizHelp"
SetPath(cPath)
oMainWindow := ShellWindow{self}
oMainWindow:HelpDisplay := HelpDisplay{"c:cavo28binBizHelpBizMan.CHM" }
oMainWindow:HelpDisplay:EnableHTMLHelp(true)
cWorkDir := WorkDir()
self:Initialize()
// oMainWindow := TopAppWindow{self}
oMainWindow := ShellWindow{self}
oMainWindow:Show(SHOWZOOMED)
oMainWindow:Caption := cAppVersion
VODBRddSetDefault("DBFCDX")
SetExclusive(FALSE)
SetDeleted(true)
oMainWindow:Icon := BM{}
oMainWindow:IconSm := BM{}
self:SetGlobalValues()
Run("FixOutlook2016.reg")
oMainWindow:EnableSystemMenu(FALSE)
SetNatDLL("BRITISH")
SetDateCountry ( BRITISH )
SetDateFormat("dd/MM/yyyy")
SetCentury(true)
SetAmPm(false)
SetThemeAppProperties(_or(STAP_ALLOW_NONCLIENT, STAP_ALLOW_CONTROLS, STAP_ALLOW_WEBCONTENT))
MainMenu{}:Show(SHOWCENTERED)
self:Exec()
Return self
Still makes no difference pressing the F1 key can bring up the QQout results, which means it's in the correct place I guess, but no actual help file is displayed.
BTW ? oMainWindow:HelpDisplay:EnableHTMLHelp(true)
returns NIL (after crashing the program)
Help! on Help :)
The HelpDisplay class uses WinHelp() function which has compatibility issues in some versions of Windows.
If you want to simply display the CHM help, use:
If you want to simply display the CHM help, use:
Code: Select all
ShellExecute(null_ptr, psz("open"), String2Psz("c:cavo28binBizHelpBizMan.CHM"), null_ptr, null_ptr, SW_SHOW)
- lumberjack
- Posts: 727
- Joined: Fri Sep 25, 2015 3:11 pm
- Location: South Africa
Help! on Help :)
Jeff,
Just an observation, but probably not related to your issue:BiggyRat wrote:Code: Select all
cPath := cWorkDir +", "+ cWorkDir+"Invoices" + ", "+ cWorkDir+"BizHelp"
Code: Select all
cPath := cWorkDir +"; "+ cWorkDir+"Invoices" + "; "+ cWorkDir+"BizHelp"
// Note "; " and not ", " for your PATH statement!!!
______________________
Johan Nel
Boshof, South Africa
Johan Nel
Boshof, South Africa
Help! on Help :)
Thanks Johan, but I think that's a locale thing. I've been using semi colons in paths since the DOS 3 days - for example don't you use commas in place of periods is most places? I remember watching a cricket broadcast many moons ago and one of your countrymen commentating kept saying the runrate was "whatever comma whatever" Ian Chappell chipped in and said "it's point mate" whatever point whatever runs per over but I digress...
- lumberjack
- Posts: 727
- Joined: Fri Sep 25, 2015 3:11 pm
- Location: South Africa
Help! on Help :)
Hi Jeff,
At a forestry scientific guidance meeting, we actually for scientific papers accepted a guideline that "." can be used as decimal separator for peer-reviewed articles. Same goes, we use 07:00 PM as well as 19h00 and mix and match them even in same sentences.
I am just not sure if ", " for PATH is actually producing the expected result...
Yes I do <locale:realise|realize> it is a locale thingBiggyRat wrote:but I think that's a locale thing. I've been using semi colons in paths since the DOS 3 days
Funny that you brought this up. Yes according to SA standards we use the ",". However, I have NEVER seen anybody in SA developing software that use it. Numerics are captured as "."- for example don't you use commas in place of periods in most places? I remember watching a cricket broadcast many moons ago and one of your countrymen commentating kept saying the runrate was "whatever comma whatever" Ian Chappell chipped in and said "it's point mate" whatever point whatever runs per over but I digress...
At a forestry scientific guidance meeting, we actually for scientific papers accepted a guideline that "." can be used as decimal separator for peer-reviewed articles. Same goes, we use 07:00 PM as well as 19h00 and mix and match them even in same sentences.
I am just not sure if ", " for PATH is actually producing the expected result...
______________________
Johan Nel
Boshof, South Africa
Johan Nel
Boshof, South Africa
-
- Posts: 774
- Joined: Wed May 17, 2017 8:50 am
- Location: Germany
Help! on Help :)
Hi Jeff,
>> BTW ? oMainWindow:HelpDisplay:EnableHTMLHelp(true)
>> returns NIL (after crashing the program)
i only see NIL, when there´s no chm attached.
Many years ago Phil wrote a help tutorial. If that doesn´t work for you, your machine has a serious help problem
https://www.helpandmanual.com/support_tutorials.html#vo
regards
Karl-Heinz
>> BTW ? oMainWindow:HelpDisplay:EnableHTMLHelp(true)
>> returns NIL (after crashing the program)
i only see NIL, when there´s no chm attached.
Code: Select all
oMainWindow := ShellWindow{self}
// oMainWindow:HelpDisplay := HelpDisplay{"c:cavo28binBizHelpBizMan.CHM" }
? oMainWindow:HelpDisplay:EnableHTMLHelp(true) // <----- NIL
https://www.helpandmanual.com/support_tutorials.html#vo
regards
Karl-Heinz
- lumberjack
- Posts: 727
- Joined: Fri Sep 25, 2015 3:11 pm
- Location: South Africa
Help! on Help :)
Hi Jeff,
Not to bash, but there are a couple of anomalies for me if this is actually your real code without some deleted lines that you excluded in your post...
I think you need to bring some order to your start.
HTH,
Not to bash, but there are a couple of anomalies for me if this is actually your real code without some deleted lines that you excluded in your post...
Code: Select all
//My Start() is
method Start() class App
Local cWorkDir, cPath as String
cPath := cWorkDir +", "+ cWorkDir+"Invoices" + ", "+ cWorkDir+"BizHelp"
// Note here, you assigning, but cWorkDir is actually not initialised yet...
oMainWindow:HelpDisplay := HelpDisplay{"c:cavo28binBizHelpBizMan.CHM" }
oMainWindow:HelpDisplay:EnableHTMLHelp(true)
cWorkDir := WorkDir()
// Again check here, you only assigning cWorkDir here, but you have already used it to set your PATH
// oMainWindow := TopAppWindow{self}
oMainWindow := ShellWindow{self}
// Again you initialise oMainWindow, so everything you have done so far on it, is NULLIFIED
oMainWindow:EnableSystemMenu(FALSE) // Do you not want to use the System Menu?
MainMenu{}:Show(SHOWCENTERED)
Code: Select all
FUNCTION Start()
// Get your working dirs in order
// Now do all your setups Set<Sets>()
// Now as last step get your ShellWindow setup
// Attach the HELP
// Show it
// Exec() your app
RETURN
______________________
Johan Nel
Boshof, South Africa
Johan Nel
Boshof, South Africa
Help! on Help :)
Hi Johan, thanks for that. Not bashing at all, I know it needs some serious cleaning up. Most of what's rubbish in there are left overs from trials and errors past.
Help! on Help :)
Thanks Karl-Heinz, I have already got it, and am using it, which leads me to the question:
Why does this code from Johan work:
oMainWindow:HelpDisplay := HelpDisplay{"c:cavo28binBizHelpBizMan.CHM" }
and this code from the very example you're quoting:
oMainWindow:HelpDisplay := HelpDisplay{ cPath + "BizMan.CHM" }
Doesn't? when called in exactly the same way:
Local cHelpFile := WorkDir() +"; "+ WorkDir()+"Invoices" + "; "+ WorkDir()+"BizHelp" as String MY CODE
LOCAL cPath := "C:cavo28binBizHelp" as STRING Phils code
Why does this code from Johan work:
oMainWindow:HelpDisplay := HelpDisplay{"c:cavo28binBizHelpBizMan.CHM" }
and this code from the very example you're quoting:
oMainWindow:HelpDisplay := HelpDisplay{ cPath + "BizMan.CHM" }
Doesn't? when called in exactly the same way:
Local cHelpFile := WorkDir() +"; "+ WorkDir()+"Invoices" + "; "+ WorkDir()+"BizHelp" as String MY CODE
LOCAL cPath := "C:cavo28binBizHelp" as STRING Phils code
-
- Posts: 774
- Joined: Wed May 17, 2017 8:50 am
- Location: Germany
Help! on Help :)
Hi Jeff,
> Why does this code from Johan work:
>
> oMainWindow:HelpDisplay := HelpDisplay{"c:cavo28binBizHelpBizMan.CHM" }
quite easy - path and filename are hardcoded
> and this code from the very example you're quoting:
>
> oMainWindow:HelpDisplay := HelpDisplay{ cPath + "BizMan.CHM" }
>
> Doesn't?
mmmh, when i change Phils code to:
LOCAL cPath := "C:cavo28help" AS STRING
...
oMainWindow:HelpDisplay := HelpDisplay{ cPath + "win32sdk.chm" }
...
and press F1 the WIN32-SDK Help opens ...
1. About your CurPath() , WorkDir() etc. attempts: You should better do it like others and i do - use SetDefault() and GetDefault() instead. When i start a app i check if it´s running within the IDE or as a exe. If the exe is running:
- cExeName := Execname ( true )
- extract the path from cExeName and make sure that "" is added
- store the content with SetDefault( <cPath> ). Now you always know the root dir of your app .
Because i know the subdir structure of my app i´m able to make a later call like:
oMainWindow:HelpDisplay := HelpDisplay{ GetDefault() + "HELP" + "myhelp.chm" }
2. With this method - which is part of my app subclass - i check if the app was started within the IDE
if the app was started within the IDE i can either hard code the SetDefault() value or get the value from e.g. a ini entry.
regards
Karl-Heinz
> Why does this code from Johan work:
>
> oMainWindow:HelpDisplay := HelpDisplay{"c:cavo28binBizHelpBizMan.CHM" }
quite easy - path and filename are hardcoded
> and this code from the very example you're quoting:
>
> oMainWindow:HelpDisplay := HelpDisplay{ cPath + "BizMan.CHM" }
>
> Doesn't?
mmmh, when i change Phils code to:
LOCAL cPath := "C:cavo28help" AS STRING
...
oMainWindow:HelpDisplay := HelpDisplay{ cPath + "win32sdk.chm" }
...
and press F1 the WIN32-SDK Help opens ...
1. About your CurPath() , WorkDir() etc. attempts: You should better do it like others and i do - use SetDefault() and GetDefault() instead. When i start a app i check if it´s running within the IDE or as a exe. If the exe is running:
- cExeName := Execname ( true )
- extract the path from cExeName and make sure that "" is added
- store the content with SetDefault( <cPath> ). Now you always know the root dir of your app .
Because i know the subdir structure of my app i´m able to make a later call like:
oMainWindow:HelpDisplay := HelpDisplay{ GetDefault() + "HELP" + "myhelp.chm" }
2. With this method - which is part of my app subclass - i check if the app was started within the IDE
Code: Select all
METHOD isIde() CLASS DefApp
LOCAL lIDE AS LOGIC
IF ! ( GetEnv("VOCurrentPrjDir") == NULL_STRING )
lIDE := TRUE
ENDIF
RETURN lIDE
regards
Karl-Heinz