Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Calling functions??
Message
De
11/08/1998 05:31:37
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00125333
Message ID:
00125499
Vues:
15
Perry,
Although structure seems erroneous to me and code is partial, I have a scenario why it fires twice :

>I got the shutdown procdure to work as a separate .prg, but the only thing that's strange is I get 2 messageboxes asking if I want to close the program,
>here's the code I'm using:
>
>
*--shutdown procedure
>
>IF TYPE("goApp")=="O" AND NOT ISNULL(goApp)
>	RETURN goApp.OnShutDown()<hr>
*goApp.onshutdown called and might be firing first message<hr>
>ENDIF
>
>Cleanup()<hr>
*Really no vital cleanup code unless development
*you could completely remove it and use as a prg for development time<pr>
*Most probably returning immediately .t. (CNTBAR("_msysmenu")=7)<hr>
>
>IF !glDebug<hr>
* If ever cleanup could pass [if CNTBAR("_msysmenu")=7]
* release all and clear all would cause glDebug to be released
* and therefore an error would occur here
* I think CNTBAR("_msysmenu")=7 now 
* and you go to else part<hr>
>	QUIT
>ELSE
>	goApp.RELEASE<hr>
* GoApp.release might be firing the message second time<hr>
>ENDIF<hr>
* Here the control would return to system - command window
* What I culdn't understand if scenario is true what restores
* the sysmenu, on error etc (or not restored ?)<hr>
>
>FUNCTION Cleanup
>	IF CNTBAR("_msysmenu")=7
>		RETURN
>	ENDIF
>	ON ERROR
>	ON SHUTDOWN
>	SET CLASSLIB TO
>	SET PATH TO
>	RELEASE ALL
>	CLEAR ALL
>	CLOSE ALL
>	POP MENU _MSYSMENU
>	RETURN
>ENDFUNC
>
>Perry

Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform