Unknown error code

All except GUI problems
Post Reply
dmuysers
Posts: 2
Joined: Thu Sep 22, 2016 4:49 pm

Unknown error code

Post 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?
User avatar
Ivan Denisov
Posts: 362
Joined: Tue Sep 17, 2013 12:21 am
Location: Krasnoyarsk, Russia

Re: Unknown error code

Post 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.
User avatar
Robert
Posts: 177
Joined: Sat Sep 28, 2013 11:04 am
Location: Edinburgh, Scotland

Re: Unknown error code

Post 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.
Josef Templ
Posts: 262
Joined: Tue Sep 17, 2013 6:50 am

Re: Unknown error code

Post 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
dmuysers
Posts: 2
Joined: Thu Sep 22, 2016 4:49 pm

Re: Unknown error code

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