herculanojs Posted December 12, 2017 Share Posted December 12, 2017 In some situations, and they are not always, messagedlg is apparently lost. In the attached image, note that the focus is not on any of the buttons. And even preloading the message does not escape either.This has been occurring sporadically, and in various different places in the system. In the image screen, in the evy onkeydow of the unidbgrid is executed a procedure, that there is nothing special in it, that could be causing this. Alguém teria uma idéia do que gera esse tipo de anormalidade? procedure TfrVenda_Mercadoria.DBGridProdutoKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState);begin if key = vk_delete then exclui_produto;end; procedure TfrVenda_Mercadoria.exclui_produto;begin if UniPageControl1.ActivePage=tbsProdutos then begin if qryProdutos.IsEmpty then exit; end else begin if qryTroca.IsEmpty then exit; end; if MessageDlg(datamodel.link.Constante.ExcluirRegistro, mtConfirmation, mbYesNo) <> mrYes then exit; try if UniPageControl1.ActivePage=tbsProdutos then qryProdutos.Delete else qryTroca.Delete; CalculaVenda; except on e:exception do begin DataModel.link.Mensagem.MsgErro(e.Message); end; End;end; Quote Link to comment Share on other sites More sharing options...
Gustavo.deo Posted December 19, 2017 Share Posted December 19, 2017 In some situations, and they are not always, messagedlg is apparently lost. In the attached image, note that the focus is not on any of the buttons. And even preloading the message does not escape either. This has been occurring sporadically, and in various different places in the system. In the image screen, in the evy onkeydow of the unidbgrid is executed a procedure, that there is nothing special in it, that could be causing this. Alguém teria uma idéia do que gera esse tipo de anormalidade? procedure TfrVenda_Mercadoria.DBGridProdutoKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState); begin if key = vk_delete then exclui_produto; end; procedure TfrVenda_Mercadoria.exclui_produto; begin if UniPageControl1.ActivePage=tbsProdutos then begin if qryProdutos.IsEmpty then exit; end else begin if qryTroca.IsEmpty then exit; end; if MessageDlg(datamodel.link.Constante.ExcluirRegistro, mtConfirmation, mbYesNo) <> mrYes then exit; try if UniPageControl1.ActivePage=tbsProdutos then qryProdutos.Delete else qryTroca.Delete; CalculaVenda; except on e:exception do begin DataModel.link.Mensagem.MsgErro(e.Message); end; End; end; Boa tarde... sou novo no unigui e ainda estou aprendendo alguns recursos.. Como vc fez para personalizar o msgDialog??? pois quando eu chamo o dialog, no lugar do título "questionamento" aparece new application.. e o que seria "datamodel.link.Constante.ExcluirRegistro"??? Obrigado!!! Quote Link to comment Share on other sites More sharing options...
herculanojs Posted December 27, 2017 Author Share Posted December 27, 2017 Olá Gustavo, desculpe pela demora. 1. Como vc fez para personalizar o msgDialog??? pois quando eu chamo o dialog, no lugar do título "questionamento" aparece new application.. O título da mensagem ele pega o nome da aplicação. É o mesmo padrão utilizado por aplicação vcl 2. o que seria "datamodel.link.Constante.ExcluirRegistro"??? Criei uma classe onde há constantes padrões que são utilizadas no sistema, de modo que não haja mensagens fora de padrões, e permita a manutenção caso seja necessário a mudança de alguma mensagem padrão. Hello Gustavo, sorry for the delay. 1. How did you do to customize msgDialog ??? because when I call the dialog, instead of the title "questioning" new application appears .. The title of the message takes the name of the application. It is the same standard used by vcl application 2. what would "datamodel.link.constant.excludeRegister" ??? I created a class where there are constant patterns that are used in the system, so that there are no messages out of standards, and allow the maintenance if it is necessary to change some standard messages. Quote Link to comment Share on other sites More sharing options...
Gustavo.deo Posted December 27, 2017 Share Posted December 27, 2017 Olá Gustavo, desculpe pela demora. 1. Como vc fez para personalizar o msgDialog??? pois quando eu chamo o dialog, no lugar do título "questionamento" aparece new application.. O título da mensagem ele pega o nome da aplicação. É o mesmo padrão utilizado por aplicação vcl 2. o que seria "datamodel.link.Constante.ExcluirRegistro"??? Criei uma classe onde há constantes padrões que são utilizadas no sistema, de modo que não haja mensagens fora de padrões, e permita a manutenção caso seja necessário a mudança de alguma mensagem padrão. Hello Gustavo, sorry for the delay. 1. How did you do to customize msgDialog ??? because when I call the dialog, instead of the title "questioning" new application appears .. The title of the message takes the name of the application. It is the same standard used by vcl application 2. what would "datamodel.link.constant.excludeRegister" ??? I created a class where there are constant patterns that are used in the system, so that there are no messages out of standards, and allow the maintenance if it is necessary to change some standard messages. Thank you ... you were very attentive answering the messages en gave me a good hint of how to solve my problem ... I adapted some things and worked perfectly .. thank you !!! 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.