Jump to content

LogSistemas01

Members
  • Posts

    45
  • Joined

  • Last visited

Everything posted by LogSistemas01

  1. As the picture below My form is positioned below the "Adicionar" button and opened by the Show command. It can be found in the "Outros Dados" tabsheet in "PageControl_X" which is inside the "Cadastro de Pessoa" Screen, which is also inside a TabnSheet in "PageControl_Y" What I wanted is that when changing the tabsheet of PageControl_X or PageControl_Y, if the form is visible, the form would hide and when returning to the correct TabSheet, it would present again. I can even do this in the PageControl onChange event by calling the Hide option. but I'm having to have control variables for this, as the forms increase this can complicate it a little. If there were some way through web language to make it more automatic would be better. That is what I need, I hope it has become clear.
  2. How to put a image here ? Insert other media doest work
  3. Hello I have a form where it appears as a popup, with the Show routine. It is invoked by a button inside a TabSheet. I wanted to know how I do to link this form to this tabsheet, that is, when changing tabsheet, it hides, when it comes back to it, it appears, because it will be in the tabsheet.
  4. I'd like you conditionals. I dont know if i will use madexcept, but thanks! Based on my tests, assigning True to Handled, the standard unigui warning of the error is not displayed, What would it be AlertDisabled := True; thanks!
  5. Thanks!! Good possibility!
  6. Ah, I know this possibility, I used it only once, thanks for reminding me!
  7. Hello people, would I like to put an image of Fontawesome in the column of my grid? I managed to do it by putting in SQL: <i class = "far fa-edit"> </i> It worked, but it doesn't make much sense to have this information in SQL. I was wondering if there is another way? If it is possible to put a button too, then on that button I would put fontawesome. I searched the demos and didn't find it, I saw only one case with an image where canvas is used. If there is an easier way it would be good to know. And also if it is possible to make the HandPoint mouse cursor appear in the column with the image. Thank you guys!
  8. Folks, at VCL, I did exception handling with TApplicationEvents.OnException All exceptions burst in this routine, I treated the way to display the message according to the type of exception, if it was a controlled exception, it shows a simple message, if not, it shows some other details. Is it possible to do this centralization of exception in Unigui? Through applicationevents it was not possible.
  9. Hello, I realized today that the problem of setfocus still occurs. I have the current trial version. The informed function JSCallDefer worked. If you do the same operation with Showmessage, it works normally with uniEdit.Setfocus; I don't know if it has already been fixed, I would open a topic, but as I located this topic, I'm just giving feedback here.
  10. Search for Horse for delphi. It's extremely easy.
  11. Hello people, I had the following situation: I needed to change a mask at run time based on the index of a UniCombobox. If index 1, mask XXX If index 2, mask YYY. I resolved it as follows: UniEdit1.JSInterface.JSCode ('$ ("#' + UniEdit1.JSName + '_id-inputEl"). Inputmask ("999.999.999-99");'); I just change the mask according to the index. I wanted to understand the following question: To apply css to a Unibutton for example, I add the css class to the button, as follows: UniButton.JSInterface.JSCall ('addCls', ['className']); This way the CSS is applied correctly. From what I've studied, this routine above is JQuery call (https://www.w3schools.com/jquery/html_addclass.asp). The example I reported for the mask is also JQuery call (https://plugins.jquery.com/jquery.inputmask/) I tried to call the mask routine in a similar way to the addClass routine, but without success. UniEdit1.JSInterface.JSCall ('inputmask', '999.999.999-99'); I wanted to understand why JSCALL worked with addClass and did not work with inputmask? I may be making trouble with everything, if anyone can clear me up I would be grateful. How to make JQuery calls, Js I still don't understand, I'm confused, if someone has some study material and can indicate it would be good too. thank you.
  12. I understood. With rest it seems to be simpler and safer. Thank you for the tips.
  13. Nice! Thank you!! I didnt know about "offlining connection".
  14. Yes, we are studying restdataware. But until we learn, we are in that situation. But thanks for the advice. But what did you say, does restdataware automatically create and destroy the connection? Thank you again!
  15. Hello people, I'm starting at Unigui and doing VCL conversion. My team and I have the following scenario regarding connection to the database. We have a class that manages the connection to the database. Every time it is needed, it is created and connected to the database, and after completing the process it is destroyed. This way, at various times, the application will not be connected to the bank. In the other case, it would be to have the connection component in the MainModule connected all the time. I would like to know what you think would be better in terms of consuming less resources, since one option stays connected all the time and the other makes several connections? If anyone has or has had this scenario and can give some feedback, I would be grateful. Any tip is welcome. Thank you!
  16. Olá pessoal, Estou iniciando no Unigui e fazendo conversão do VCL. Eu e minha equipe temos o seguinte cenário referente conexão com o banco de dados. Temos uma classe que gerencia a conexão com o banco de dados. A cada vez que é necessário, ela é criada e conecta no banco do cliente, e após concluir o processo ela é destruída. Dessa forma, em vários momentos, a aplicação não estará conectada no banco. No outro caso, seria ter o componente de conexão no MainModule o tempo todo conectado. Gostaria de saber o que vocês acham que seria melhor em termos de consumir menos recursos, visto que uma opção se mantém o tempo todo conectado e o outro faz várias conexões ? Se alguém tem ou já teve este cenário e puder dar algum feedback, ficaria agradecido. Qualquer dica é bem vinda. Obrigado!
  17. Hello, I'm starting at Unigui and converting a class, a Singleton. How to deal with this in Unigui, since it will have the same value between sessions and I need it to be different. It is a User class, where I store data and permissions, but I have other cases as well. I saw in the manual, an example where a record was created in MainModule, I would not like to have this 'dependency' there, is there another way to do this? Making my class a singleton per session ? Follow my class to analyze. type TSystem = class private constructor Create; destructor Destroy; override; class var FCompany: TCompanyController; class var FUser: TUserController; public class function LogIn(CompanyID: integer = 0; UserID: integer = 0): TCompanyController; class function LoggedUser: TCompanyController; class function LoggedCompany: TUserController; end; implementation { TSistema } constructor TSystem.Create; begin end; destructor TSystem.Destroy; begin inherited; end; class function TSystem.LoggedUser: TCompanyController; begin FCompany.RefreshConn; Result := FCompany; end; class function TSystem.LogIn(CompanyID: integer = 0; UserID: integer = 0): TCompanyController; begin try {Colocar destroy das classes no logout e finalization} if not Assigned(FUser) then FUser := TUserController.Create; if not Assigned(FCompany) then FCompany := TCompanyController.Create; FCompany.Get( CompanyID ); FUser.Get( UserID, CompanyID); Result := FCompany; except on E: Exception do begin Raise; end; end; end; class function TSystem.LoggedCompany: TUserController; begin if not Assigned( FUser ) then raise Exception.Create('FUsuarioLogado não instanciado, realize o login na empresa!'); FUser.RefreshConn; Result := FUser; end; initialization finalization if Assigned(TSystem.FCompany) then FreeAndNil(TSystem.FCompany); if Assigned(TSystem.FUser) then FreeAndNil(TSystem.FUser); end. Example: Open 2 Sessions 1º Session TSystem.LogIn(1,1); ShowMessage(TSystem.LoggedUser.User.Name); Shows 'User 1'. 2º Session TSystem.LogIn(2,2); ShowMessage(TSystem.LoggedUser.User.Name); Shows 'User 2' On 1º Session ShowMessage(TSystem.LoggedUser.User.Name); Also shows 'User 2' Thank you!
×
×
  • Create New...