Unknown error code

All except GUI problems

Unknown error code

Postby dmuysers » Thu Sep 22, 2016 4:58 pm

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

Re: Unknown error code

Postby Ivan Denisov » Fri Sep 23, 2016 3:11 am

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

Re: Unknown error code

Postby Robert » Fri Sep 23, 2016 8:44 am

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

Re: Unknown error code

Postby Josef Templ » Fri Sep 23, 2016 12:24 pm

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

Re: Unknown error code

Postby dmuysers » Sat Sep 24, 2016 4:33 pm

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


Return to BlackBox Framework

Who is online

Users browsing this forum: No registered users and 1 guest