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?
Unknown error code
- Ivan Denisov
- Posts: 362
- Joined: Tue Sep 17, 2013 12:21 am
- Location: Krasnoyarsk, Russia
Re: Unknown error code
When the error appears?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?
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
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.
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.
-
- Posts: 262
- Joined: Tue Sep 17, 2013 6:50 am
Re: Unknown error code
This is an "undocumented feature" of HostFiles.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?
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
Ok, got it.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)
Thank you Mr Templ.