asapltda Posted November 16, 2014 Posted November 16, 2014 Hi I'm using the following procedure displaying a modal form . The form is called must provide the client code that is going to work and back using a shared drive for both forms In the desktop version of the method works, but in mobile form does not work. What is the Right Way? g_cliente:=''; UnimTimer1.Enabled :=TRUE; FPARAMETROSGENMVL.ShowModal( procedure(sender: TComponent; Result: Integer) var i:Integer; begin if Result = mrOk then begin BTN_CONFIGURACION.UI := 'action'; UnimBitBtn1.UI := 'action'; UnimBitBtn1.Caption := CONFIGURACIONPARMS.O_CLIENTE; cliente.Text := CONFIGURACIONPARMS.O_CLIENTE; CLIENTEL.Caption := CONFIGURACIONPARMS.O_CLIENTE; CLIENTEL.Visible :=TRUE; g_cliente:= CONFIGURACIONPARMS.O_CLIENTE; end; if Result = mrcancel then begin cliente.Text := 'NO DEFINIDO'; end; end); end; --------- SHARE UNIT --- Unit CONFIGURACIONPARMS; interface var G_Usuario :String; g_PassW :string; P_USUARIO :STRING; O_CLIENTE :string; O_CLIENTESHP :string; Procedure SET_INICIAR_VALORES; implementation Procedure SET_INICIAR_VALORES; Var W_Null:Variant; BEGIN //P_RECURSO :=''; End; END. Quote
asapltda Posted November 16, 2014 Author Posted November 16, 2014 It seems that this form of call and receive another form parameters using a unit is only valid when the form is called a second and more times The first time is not running the callback to the form not the callback is executed, in the second and subsequent calls brings modicada field values defined in the unit using the callback It will be a mistake of the components? Quote
Administrators Farshad Mohajeri Posted November 16, 2014 Administrators Posted November 16, 2014 I didn't understand your issue. Please attach a test case. BTW, you are using global variables in shared unit which you must totally avoid in uniGUI. Put your globals vars in mainModule Quote
asapltda Posted November 16, 2014 Author Posted November 16, 2014 BTW, you are using global variables in shared unit which you must totally avoid in uniGUI. Put your globals vars in mainModule Modify the procedure for passing variables between forms using mainmodule , and so the edit / label defined in the main form is updated with the contents of the variables that were modified by the form daughter Case solved muchas gracias Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.