Init Procedure

Moderator: Rathinagiri

Post Reply
User avatar
andyglezl
Posts: 838
Joined: Fri Oct 26, 2012 7:58 pm
Location: Guadalajara Jalisco, MX
Has thanked: 7 times
Been thanked: 21 times
Contact:

Init Procedure

Post by andyglezl » Thu Mar 07, 2013 1:29 am

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
Attachments
programerror.png
programerror.png (29.52 KiB) Viewed 759 times
Andrés González López
Desde Guadalajara, Jalisco. México.

Leopoldo Blancas
Posts: 320
Joined: Wed Nov 21, 2012 7:14 pm
Location: México
Been thanked: 2 times

Post by Leopoldo Blancas » Thu Mar 07, 2013 3:08 am

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

User avatar
andyglezl
Posts: 838
Joined: Fri Oct 26, 2012 7:58 pm
Location: Guadalajara Jalisco, MX
Has thanked: 7 times
Been thanked: 21 times
Contact:

Post by andyglezl » Thu Mar 07, 2013 4:44 am

Hola Polo

Gracias, ya lo hice de esa forma y OK
Andrés González López
Desde Guadalajara, Jalisco. México.

Post Reply