QUIT problem

Moderator: Rathinagiri

User avatar
Czarny_Pijar
Posts: 172
Joined: Thu Mar 18, 2010 11:31 pm
Location: 19.2341 E 50.2267 N

QUIT problem

Post 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.
User avatar
fchirico
Posts: 324
Joined: Sat Aug 23, 2008 11:27 pm
Location: Argentina

Re: QUIT problem

Post 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.
Saludos, Fernando Chirico.
User avatar
Czarny_Pijar
Posts: 172
Joined: Thu Mar 18, 2010 11:31 pm
Location: 19.2341 E 50.2267 N

Re: QUIT problem

Post 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.
User avatar
fchirico
Posts: 324
Joined: Sat Aug 23, 2008 11:27 pm
Location: Argentina

Re: QUIT problem

Post 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.
Saludos, Fernando Chirico.
User avatar
esgici
Posts: 4543
Joined: Wed Jul 30, 2008 9:17 pm
DBs Used: DBF
Location: iskenderun / Turkiye
Contact:

Re: QUIT problem

Post 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
Viva INTERNATIONAL HMG :D
User avatar
Czarny_Pijar
Posts: 172
Joined: Thu Mar 18, 2010 11:31 pm
Location: 19.2341 E 50.2267 N

Re: QUIT problem

Post by Czarny_Pijar »

Checked: Inside IDE, outside IDE, Main.RELEASE command.
The problem still persist.
Attachments
quit_program.zip
Contents: 2-buttons application calling QUIT and RELEASE.
Created&compiled with HMG-IDE-3.0.25 , WinXP Pro SP3
(6.45 KiB) Downloaded 309 times
User avatar
srvet_claudio
Posts: 2193
Joined: Thu Feb 25, 2010 8:43 pm
Location: Uruguay
Contact:

Re: QUIT problem

Post 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

Best regards.
Dr. Claudio Soto
(from Uruguay)
http://srvet.blogspot.com
User avatar
Czarny_Pijar
Posts: 172
Joined: Thu Mar 18, 2010 11:31 pm
Location: 19.2341 E 50.2267 N

Re: QUIT problem

Post 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 ;)
User avatar
srvet_claudio
Posts: 2193
Joined: Thu Feb 25, 2010 8:43 pm
Location: Uruguay
Contact:

Re: QUIT problem

Post 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
Best regards.
Dr. Claudio Soto
(from Uruguay)
http://srvet.blogspot.com
User avatar
esgici
Posts: 4543
Joined: Wed Jul 30, 2008 9:17 pm
DBs Used: DBF
Location: iskenderun / Turkiye
Contact:

Re: QUIT problem

Post by esgici »

srvet_claudio wrote:This is a similar function to the QUIT command:
Gracias Dr. :D

Your veterinary skill is extremely high (appears on your bulls :D ), 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
Viva INTERNATIONAL HMG :D
Post Reply