picyka Posted April 1, 2020 Share Posted April 1, 2020 Can I use the ShowMask method in the AfterShow event of a form? procedure TUniFormConsultaPrestador.UniFormAfterShow(Sender: TObject); begin if Self.FTipoConsulta = tpLista then begin try ShowMask('Carregando dados aguarde...'); UniSession.Synchronize; Self.LoadPrestadores(tpLista,False,Self.FEndereco); finally HideMask; end; end; end; Remembering that I already use it in other system locations. Quote Link to comment Share on other sites More sharing options...
Hayri ASLAN Posted April 1, 2020 Share Posted April 1, 2020 Hi, are you getting any error? Quote Link to comment Share on other sites More sharing options...
picyka Posted April 2, 2020 Author Share Posted April 2, 2020 22 hours ago, Hayri ASLAN said: Oi, você está recebendo algum erro? No errors, neither visual nor on the console. Quote Link to comment Share on other sites More sharing options...
Hayri ASLAN Posted April 2, 2020 Share Posted April 2, 2020 1 minute ago, picyka said: No errors, neither visual nor on the console. So what's happening when you use this code? can you please create a simple test case? Quote Link to comment Share on other sites More sharing options...
picyka Posted April 2, 2020 Author Share Posted April 2, 2020 2 minutes ago, Hayri ASLAN said: Então, o que está acontecendo quando você usa esse código? você pode criar um caso de teste simples? not loading the message "Loading data please wait ..." Quote Link to comment Share on other sites More sharing options...
Hayri ASLAN Posted April 2, 2020 Share Posted April 2, 2020 You can't use syncronize onAfterShow. Quote Link to comment Share on other sites More sharing options...
picyka Posted April 2, 2020 Author Share Posted April 2, 2020 6 minutes ago, Hayri ASLAN said: Você não pode usar a sincronização onAfterShow. I have a load of data in the AfterShow event, where could I call the method? I need to put a message to wait. Quote Link to comment Share on other sites More sharing options...
Hayri ASLAN Posted April 2, 2020 Share Posted April 2, 2020 Why you are not doing it onbeforeshow without showing a mask Quote Link to comment Share on other sites More sharing options...
picyka Posted April 2, 2020 Author Share Posted April 2, 2020 11 minutes ago, Hayri ASLAN said: Por que você não está fazendo isso antes da exibição sem mostrar uma máscara The data load is being done when opening the form, I need a mask because the process is slow, when opening the form where I could load the data? being that it has no interest of the user to load the data. Quote Link to comment Share on other sites More sharing options...
Hayri ASLAN Posted April 2, 2020 Share Posted April 2, 2020 Use onbeforeshow to load your data. How are you calling-showing that form? Quote Link to comment Share on other sites More sharing options...
picyka Posted April 2, 2020 Author Share Posted April 2, 2020 12 minutes ago, Hayri ASLAN said: Use onbeforeshow para carregar seus dados. Como você está chamando, mostrando esse formulário? how can i send a link in private? Quote Link to comment Share on other sites More sharing options...
Hayri ASLAN Posted April 2, 2020 Share Posted April 2, 2020 You don't need to send your project. Just create a testcase 3 minutes ago, picyka said: how can i send a link in private? Quote Link to comment Share on other sites More sharing options...
picyka Posted April 2, 2020 Author Share Posted April 2, 2020 I moved the code to onbeforeSow, the mask works! Quote Link to comment Share on other sites More sharing options...
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.