Page 1 of 3
QUIT problem
Posted: Fri Mar 19, 2010 6:22 pm
by Czarny_Pijar
I've expected
QUIT (
http://www.itlnet.net/programming/progr ... d4acc.html ) is an equivalent of
Alt-F4, unfortunately not.
The bad news are: The program runned from IDE stays to reside in the memory, disabling the further development. The file
error.log gives an explanation:
Can't delete previous my_prog.exe version (still running?) .
The good news are: At this point with
Alt-Ctrl-Del option you can remove the unwanted garbage.
Re: QUIT problem
Posted: Fri Mar 19, 2010 6:44 pm
by fchirico
Czarny_Pijar wrote:I've expected
QUIT (
http://www.itlnet.net/programming/progr ... d4acc.html ) is an equivalent of
Alt-F4, unfortunately not.
The bad news are: The program runned from IDE stays to reside in the memory, disabling the further development. The file
error.log gives an explanation:
Can't delete previous my_prog.exe version (still running?) .
The good news are: At this point with
Alt-Ctrl-Del option you can remove the unwanted garbage.
Estimado:
SPANISH:
El comando QUIT efectivamente cierra la aplicación. Evidentemente debes estar haciendo algo incorrecto, revisa tu código por favor o post.
ENGLISH:
The QUIT command effectively closes the application. Obviously you must be doing something wrong, please check your code or post.
Re: QUIT problem
Posted: Fri Mar 19, 2010 7:03 pm
by Czarny_Pijar
fchirico wrote:
SPANISH:
El comando QUIT efectivamente cierra la aplicación.
ENGLISH:
The QUIT command effectively closes the application.
That's exactly what I want to do, but I can't.
I want to be able to close my program with
QUIT command, without
Alt-F4. There's nothing to check,
QUIT is
QUIT, no cotroversy here.
Re: QUIT problem
Posted: Fri Mar 19, 2010 7:40 pm
by fchirico
Czarny_Pijar wrote:fchirico wrote:
SPANISH:
El comando QUIT efectivamente cierra la aplicación.
ENGLISH:
The QUIT command effectively closes the application.
That's exactly what I want to do, but I can't.
I want to be able to close my program with
QUIT command, without
Alt-F4. There's nothing to check,
QUIT is
QUIT, no cotroversy here.
SPANISH
Aparentemente tu estás intentando borrar el programa ejecutable desde el IDE. Corre tu aplicación cerrando el IDE.
De otra forma debes revisar tu código, algo no está correcto.
English:
Apparently you're trying to delete the executable program from the IDE. Run your application by closing the IDE.
Otherwise you should check your code, something is wrong.
Re: QUIT problem
Posted: Fri Mar 19, 2010 7:57 pm
by esgici
Czarny_Pijar wrote:
...
That's exactly what I want to do, but I can't.
...
Hi Czarny_Pijar
Did you tried
<main_form_of_your_application>.RELEASE
instead of
QUIT
Regards
--
Esgici
Re: QUIT problem
Posted: Sat Mar 20, 2010 9:25 am
by Czarny_Pijar
Checked: Inside IDE, outside IDE, Main.RELEASE command.
The problem still persist.
Re: QUIT problem
Posted: Sat Mar 20, 2010 12:25 pm
by srvet_claudio
Look the following example:
Code: Select all
*** File: Main.prg ***
#include <hmg.ch>
Function Main
Load Window Main
Main.Center
DEFINE BUTTON Button_2
PARENT main // new line
ROW 110
COL 50
WIDTH 520
HEIGHT 50
ACTION release_the_prog()
CAPTION "Click to Main.RELEASE ( not working )"
FONTNAME "Arial"
FONTSIZE 16
TOOLTIP ""
FONTBOLD .F.
FONTITALIC .F.
FONTUNDERLINE .F.
FONTSTRIKEOUT .F.
ONGOTFOCUS Nil
ONLOSTFOCUS Nil
HELPID Nil
FLAT .F.
TABSTOP .T.
VISIBLE .T.
TRANSPARENT .F.
MULTILINE .F.
PICTURE Nil
PICTALIGNMENT TOP
END BUTTON
Main.Activate
Return
*-------------------------------------- Suggested by EGISCI
procedure release_the_prog()
msginfo ("Release Window") // new line
Main.RELEASE
return
*--------------------------------------
Code: Select all
*** File: Main.Fmg ***
* HMG-IDE Form Designer Generated Code
* (c) Roberto Lopez - http://harbourminigui.googlepages.com
DEFINE WINDOW TEMPLATE AT 138 , 235 WIDTH 550 HEIGHT 350 VIRTUAL WIDTH Nil VIRTUAL HEIGHT Nil TITLE "" ICON NIL MAIN CURSOR NIL ON INIT Nil ON RELEASE Nil ON INTERACTIVECLOSE Nil ON MOUSECLICK Nil ON MOUSEDRAG Nil ON MOUSEMOVE Nil ON SIZE Nil ON MAXIMIZE Nil ON MINIMIZE Nil ON PAINT Nil BACKCOLOR Nil NOTIFYICON NIL NOTIFYTOOLTIP NIL ON NOTIFYCLICK Nil ON GOTFOCUS Nil ON LOSTFOCUS Nil ON SCROLLUP Nil ON SCROLLDOWN Nil ON SCROLLLEFT Nil ON SCROLLRIGHT Nil ON HSCROLLBOX Nil ON VSCROLLBOX Nil
END WINDOW
Re: QUIT problem
Posted: Sat Mar 20, 2010 1:41 pm
by Czarny_Pijar
Ta da! finally works as expected. Thank you all for help, the response was unusuall fast and reliable, comparing to other known forums

Let's consider this thread to be
solved and
closed.
PS
1) srvet_claudio : I've manually corrected *.fmg file, inserting 'PARENT Main' - this also works

2) despite solving this problem, I wish in the future realease, the 'QUIT' command should be more powerfull

Re: QUIT problem
Posted: Sat Mar 20, 2010 2:42 pm
by srvet_claudio
This is a similar function to the QUIT command:
Code: Select all
Procedure Func_QUIT ()
CLOSE ALL
RELEASE WINDOW ALL
Return
Regards,
Claudio
Re: QUIT problem
Posted: Sat Mar 20, 2010 3:41 pm
by esgici
srvet_claudio wrote:This is a similar function to the QUIT command:
Gracias Dr.
Your veterinary skill is extremely high (appears on your bulls

), but your programming skill is superb; congrats
Now, could we say :
"
QUIT command is highly dangerous in HMG applications. Both don't work as expected and also restricts other commands (RELEASE in example)"
Regards and saludos
--
Esgici