Page 1 of 1

Unknown error code

Posted: Thu Sep 22, 2016 4:58 pm
by dmuysers
I try to understand the code in HostFiles (BlackBox-1.7 for Windows).
In line 790 appears an error code "76".
It is not a Windows "GetLastError" code and it is not defined/used elsewhere
in any existing BlackBox module. Can anybody explain me what is its
meaning or purpose?

Re: Unknown error code

Posted: Fri Sep 23, 2016 3:11 am
by Ivan Denisov
dmuysers wrote:I try to understand the code in HostFiles (BlackBox-1.7 for Windows).
In line 790 appears an error code "76".
It is not a Windows "GetLastError" code and it is not defined/used elsewhere
in any existing BlackBox module. Can anybody explain me what is its
meaning or purpose?
When the error appears?
Is there another HostFiles in your working directory?
Please, provide screenshot of the error position. Line 790 seems to be without problem in last stable version.

Re: Unknown error code

Posted: Fri Sep 23, 2016 8:44 am
by Robert
The code tests if "loc.res = 76", and responds by creating a directory (apparently).

But I also can't find where, or why, loc.res is set to 76. The Files Docu gives no clues.
This line is Bold, which might be a clue that it was only ever an experimental line, and should bave been removed.

Personally I find the Locator error codes rather unsatisfactory. If I (try to) set a Locator to a non-existent path I get no error, even though the Docu implies I should get error code 2.

Re: Unknown error code

Posted: Fri Sep 23, 2016 12:24 pm
by Josef Templ
dmuysers wrote:I try to understand the code in HostFiles (BlackBox-1.7 for Windows).
In line 790 appears an error code "76".
It is not a Windows "GetLastError" code and it is not defined/used elsewhere
in any existing BlackBox module. Can anybody explain me what is its
meaning or purpose?
This is an "undocumented feature" of HostFiles.
It allows you to avoid the Yes/No dialog when creating a new directory.
It is used in DevSubTool. Search for "76".

In 1.7 it should be possible to avoid this "undocumented feature" by temporarily setting
the flag ignoreAsk by means of calling HostFiles.IgnoreAsk and later setting it back by HostFiles.UseAsk.
But this would then require to import HostFiles. In 1.7 this "undocumented feature"
has been retained for compatibility reasons.

- Josef

Re: Unknown error code

Posted: Sat Sep 24, 2016 4:33 pm
by dmuysers
This is an "undocumented feature" of HostFiles.
It allows you to avoid the Yes/No dialog when creating a new directory.
It is used in DevSubTool. Search for "76". (Josef Templ)
Ok, got it.
Thank you Mr Templ.