Gamestudio Links
Zorro Links
Newest Posts
Blobsculptor tools and objects download here
by NeoDumont. 03/28/24 03:01
Issue with Multi-Core WFO Training
by aliswee. 03/24/24 20:20
Why Zorro supports up to 72 cores?
by Edgar_Herrera. 03/23/24 21:41
Zorro Trader GPT
by TipmyPip. 03/06/24 09:27
VSCode instead of SED
by 3run. 03/01/24 19:06
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
5 registered members (AndrewAMD, monk12, TipmyPip, Quad, aliswee), 1,029 guests, and 6 spiders.
Key: Admin, Global Mod, Mod
Newest Members
sakolin, rajesh7827, juergen_wue, NITRO_FOREVER, jack0roses
19043 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Gracefully closing a panel #477625
07/17/19 15:02
07/17/19 15:02
Joined: Jul 2017
Posts: 783
Z
Zheka Offline OP
User
Zheka  Offline OP
User
Z

Joined: Jul 2017
Posts: 783
JCL,

If I launch a script for Testing/Trading and then [Stop] it and/or close Zorro, the panel continues to be visible on the screen without the possibility to close it (no closing/ 'cross' button in the upper right corner).
I then have to kill that Zorro instance via Task manager.

I tried this in the click():
Code
  if (row == -1 && is(RUNNING))  panel(0, 0, 0, 0);

Then pressing [Result] while the script awaits a click on my START button in the panel (while (!START && is (RUNNING)) wait(100); )- works and makes the panel disappear.

However, if I then close Zorro altogether, an instance of Zorro still runs and still has to be killed via Task manager.

Why would this happen?

Re: Gracefully closing a panel [Re: Zheka] #477627
07/17/19 15:59
07/17/19 15:59
Joined: Jul 2000
Posts: 27,977
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,977
Frankfurt
I got this forwarded from support today, but your info is so sparse that I too could not make anything out of it.

An application that not terminates is usually hanging in an endless loop. Look for this in your script. Systematically comment out parts of code until it does not hang anymore. If you then still have no success in fixing it, contact Support - they'll help.

Re: Gracefully closing a panel [Re: Zheka] #477631
07/17/19 16:35
07/17/19 16:35
Joined: Jul 2017
Posts: 783
Z
Zheka Offline OP
User
Zheka  Offline OP
User
Z

Joined: Jul 2017
Posts: 783
I assumed that pressing a [Stop] button in Zorro terminates the running script, unloads user dll (probably except for a function like click()..) .and so the script cannot "hang" after that.


How is it in reality?

Last edited by Zheka; 07/17/19 17:27.
Re: Gracefully closing a panel [Re: Zheka] #477632
07/17/19 21:25
07/17/19 21:25
Joined: Sep 2003
Posts: 929
Spirit Offline

Moderator
Spirit  Offline

Moderator

Joined: Sep 2003
Posts: 929

Re: Gracefully closing a panel [Re: Spirit] #477634
07/17/19 23:18
07/17/19 23:18
Joined: Jul 2017
Posts: 783
Z
Zheka Offline OP
User
Zheka  Offline OP
User
Z

Joined: Jul 2017
Posts: 783
Code
while ( is(RUNNING))  wait(100);
within main() does not terminate when a [Stop] button is pressed (probably because RUNNING works in run() ).

Is there another way?



Last edited by Zheka; 07/17/19 23:33.
Re: Gracefully closing a panel [Re: Zheka] #477635
07/17/19 23:50
07/17/19 23:50
Joined: Feb 2017
Posts: 1,718
Chicago
AndrewAMD Online
Serious User
AndrewAMD  Online
Serious User

Joined: Feb 2017
Posts: 1,718
Chicago
while (wait(100))

wait returns 0 when stop is pressed. You can make use of that info to call quit() and then return.

Re: Gracefully closing a panel [Re: AndrewAMD] #477636
07/18/19 00:02
07/18/19 00:02
Joined: Jul 2017
Posts: 783
Z
Zheka Offline OP
User
Zheka  Offline OP
User
Z

Joined: Jul 2017
Posts: 783
Great, this works! Thank you very much!


Moderated by  Petra 

Powered by UBB.threads™ PHP Forum Software 7.7.1