I did the following:
- start an RDP session on a Windows 2019 server.
- start the testprogram and click on test button. The modal screen appeared.
- disconnected from the server.
- started the rdp session again. The error appears as soon as the connection is made. Error in _editprotected on line 5229.
oError:args :
-> NIL
oError:canDefault : N
oError:canRetry : Y
oError:canSubstitute: N
oError:cargo : NIL
oError:description : Unknown/Invalid symbol for alias
oError:filename :
oError:genCode : 66
oError:operation : kd
oError:osCode : 0
oError:severity : 2
oError:subCode : 8021
oError:subSystem : BASE
oError:thread : 1
oError:tries : 1
------------------------------------------------------------------------------
CALLSTACK:
------------------------------------------------------------------------------
Called from (B)MAIN(31)
Called from _EDITPROTECTED(5229)
Called from DC_GETLIST:EVENTLOOP(4732)
Called from DC_GETLIST:READGUI(3977)
Called from DC_READGUI(113)
Called from TESTWINDOW(45)
Called from (B)MAIN(33)
Called from DC_XBPPUSHBUTTON:ACTION(2835)
Called from (B)DC_XBPPUSHBUTTON:INIT(2354)
Called from XBPPUSHBUTTON:HANDLEEVENT(987)
Called from DC_GETLIST:EVENTLOOP(4805)
Called from DC_GETLIST:READGUI(3977)
Called from DC_READGUI(113)
Called from MAIN(35)
The error is occurring when evaluating the editprotect code block: {||kd->name == 'Roger'}
The error handler indicates that the alias KD does not exist.
This means that either KD (kunden) file has been closed or there is a problem with threads.
This doesn't sound like an error than can be easily trapped, but I will look into it.
The eXpress train is coming - and it has more cars.
I know that this alias doesn't exist (this is by design), but the EDITPROTECT codeblock should not be evaluated, since the window containing it is disabled. But it gets the display focus for some milliseconds if a RDP-session is reconnected. Besides the alias problem, this window should never get the display focus while "TestWindow" is open. But it gets the focus if a RDP session is reconnected. This is the problem. Not the alias or the missing table. I know this.
Edit: There is no thread. This is plain SDI.
Best regards,
Tom
"Did I offend you?"
"No."
"Okay, give me a second chance."
Have you tried this to see if the owner window will be disabled?
No difference.
Just to make clear: There is nothing wrong. The wrong thing is the behaviour of a Windows Server if a RPD session is re-connected - or it's a bug in Xbase++ in that situation. The parent window should never get the display focus, since it's child is modal. This is true in all possible situations, except if a RDP session is getting re-connected. In this situation, the parent window gets the input focus although it's child is modal and the parent window is disabled. All the EDITPROTECT-codeblocks of the parent window are evaluated. Besides my sample code is total bullshit, this is something that may cause other trouble in better designed applications (maybe mine if I get this "Hello World"-stuff working!).
Best regards,
Tom
"Did I offend you?"
"No."
"Okay, give me a second chance."
At the Clipper get together in New York at the Marriot Marquis, Bill French and I were spending early morning very inebriated when he got the idea to write a Visual Edlin..
It was done the next day, and I got a gold plated (sprayed) 3.5 disk in the mail a couple of weeks later...
A few lifetimes ago....
Brian Wolfsohn
Retired and traveling around the country to music festivals in my RV.
OOPS.. Corona Virus, so NOT traveling right now... http://www.breadmanrises.com
FB travel group: The Breadman Rises