Page 1 of 1

Init Procedure

Posted: Thu Mar 07, 2013 1:29 am
by andyglezl
Hola

En el INIT PROCEDURE estoy validando que existan los archivos necesarios
para el funcionamiento de mi sistema.

Si todos existen, el sistema continua su secuencia normal,
pero si falta algun archivo, necesito que se cierre normal la aplicacion.
Se cierra pero con ERROR... alguna idea ?
------------------------------------------------------------------
Hello

In the INIT PROCEDURE'm validating the necessary files exist
for my system.

If all there, the system continues its normal sequence,
but if a file is missing, I need to close the application normally.
ERROR closes but ... any ideas?
------------------------------------------------------------------

Code: Select all

IF  cValida = Replicate( "T",33 )
    MSGINFO( "DB's OK !" )
ELSE
    MSGSTOP( "FALTA: "+adbs[ AT( "F", cValida ) ], "ERROR !" ) 
    *Form_Main.Release   //  Form_Main is not defined. Program terminated
    *Quit                //  Variable does not exist 
    *Exit                //  Variable does not exist
ENDIF

Re: Init Procedure

Posted: Thu Mar 07, 2013 3:08 am
by Leopoldo Blancas
Hola....

Es que INIT procedure... nunca hace que entre a la ventana principal (MAIN) y por eso te da error, por que no mejor validas con ON INIT <procedure> , y si no quieres que salga la ventana, le indicas NOSHOW al definirla y si validas tus DBF entonces le dices que se muestre... MAIN.SHOW....

Espero sea de tu ayuda...

Saludos
Polo
*-------------------------------------------------------------------------------------------------------------------------------------------------

Hello ....

INIT procedure is that ... never makes it enters the main window (MAIN) and therefore gives error, not valid with ON INIT best <procedure>, and if you do not want to leave the window, it tells NOSHOW to define valid and if your DBF then tell him to show ... MAIN.SHOW ....

Hope this helps you ...

regards
Polo

Re: Init Procedure

Posted: Thu Mar 07, 2013 4:44 am
by andyglezl
Hola Polo

Gracias, ya lo hice de esa forma y OK