herculanojs Posted May 25, 2017 Share Posted May 25, 2017 After updating to build 1.0.0.1394_RC, a form that had to be able to handle standardized messages, began to occur error when its dynamic creation. Until earlier versions, the problem did not occur. What can it be? class function TMensagem.MsgPergunta(const Texto: string):boolean; var form:Tuniform; PercClasse:TPersistentClass; begin PercClasse:= GetClass('TfrmMensagem'); if PercClasse <> nil then begin Try UniSession.Synchronize(true); form :=TUniFormClass(PercClasse).Create(UniApplication); if form <> nil then begin datamodel.Link.Util.PassaValor(form,'Tipo',4); datamodel.Link.Util.PassaValor(form,'Texto',Texto); result := form.ShowModal = mrYes; end; Finally //if form <> nil then // FreeAndNil(form); UniSession.Synchronize(true); End; end; end; end; Quote Link to comment Share on other sites More sharing options...
herculanojs Posted May 25, 2017 Author Share Posted May 25, 2017 I noticed that for some reason using UniSession.Synchronize (true) causes the mentioned error. I removed it and the error stopped. What is the correct usage for UniSession.Synchronize (true) ? 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.