Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 06/11/24 in all areas

  1. procedure TUniGUICacheEraser.StartEmptyTask; (line 1300 - uniGUISessionManager.pas) Please add: FindClose(sr); Reason. Resource-leak.
    1 point
  2. Hello everyone, thanks to @picyka help, I was able to adjust my ServerModule to record the exception information that I believe to be relevant. procedure TUniServerModule.UniGUIServerModuleException( Sender: TUniGUIMainModule; AException: Exception; var Handled: Boolean); ... try lLog := TStringList.Create; lLog.Add('-----------------------------------------------------------------'); lLog.Add(' Classe erro: ' + AException.ClassName); lLog.Add(' Messsagem erro: ' + AException.Message); if TUniGUIApplication(UniApplication) <> nil then begin lLog.Add(' Componente: ' + TUniGUIApplication(UniApplication).UniSession.CurrentComponent.Name + ' (' + TUniGUIApplication(UniApplication).UniSession.CurrentComponent.ClassName + ')'); if TUniControl(TUniGUIApplication(UniApplication).UniSession.CurrentComponent).Owner <> nil then lLog.Add(' Parente: ' + TUniControl(TUniGUIApplication(UniApplication).UniSession.CurrentComponent).Owner.Name); lLog.Add(' Ult. Evento Ajax: ' + TUniGUIApplication(UniApplication).UniSession.LastAjaxEvent); lLog.Add('Navegador/Versão/OS: ' + TUniGUIApplication(UniApplication).ClientInfoRec.BrowserType + '/' + IntToStr(TUniGUIApplication(UniApplication).ClientInfoRec.BrowserVersion) + '/' + TUniGUIApplication(UniApplication).ClientInfoRec.OSType); end; lLog.Add('-------------------------------------------------------------------------------------'); finally GravaLogErro(lLog.Text); lLog.Free; end; ; ... Log File test: 11/06/2024 16:51:57 ----------------------------------------------------------------- Classe erro: EAccessViolation Messsagem erro: Access violation at address 0141BC5E in module '***.exe'. Read of address 00000000 Componente: UniButton10 (TUniButton) Parente: FrmTestesTI Ult. Evento Ajax: click Navegador/Versão/OS: chrome/125/windows ------------------------------------------------------------------------------------- 11/06/2024 16:52:03 ----------------------------------------------------------------- Classe erro: EAccessViolation Messsagem erro: Access violation at address 0141BC5E in module '***.exe'. Read of address 00000000 Componente: UniButton10 (TUniButton) Parente: FrmTestesTI Ult. Evento Ajax: click Navegador/Versão/OS: chrome/125/windows ------------------------------------------------------------------------------------- 11/06/2024 16:52:13 ----------------------------------------------------------------- Classe erro: EInvalidOp Messsagem erro: Invalid floating point operation Componente: TMAutoIni (TUniTimer) Parente: FrmDashboardFinanceiro Ult. Evento Ajax: timer Navegador/Versão/OS: chrome/125/windows ------------------------------------------------------------------------------------- Now I'm going to go up to production and monitor it. As I progress in analyzing the data, I will report it here to help other developers who may have similar problems. Yours sincerely.
    1 point
  3. procedure TUMM.UniGUIMainModuleNewComponent(AComponent: TComponent); var c1, c2 : string; begin if (AComponent is TUnimFileUploadButton) then begin if AnsiUpperCase(dMotyw) = 'ZIELONY'then begin c1 := '#53af48'; c2 := '#53af48'; end else begin c1 := 'rgb(33, 150, 243)'; c2 := 'rgb(18 128 215)'; end; with (AComponent as TUnimFileUploadButton), JSInterface do begin JSCallGlobal('Ext.util.CSS.createStyleSheet', ['#'+JSId+' .x-inner-el{ '+ ' background-color: white; '+ ' border-color: '+c1+'; '+ ' border-width: 2px; '+ '}'+ '#'+JSId+' .x-text-el{ '+ ' color: '+c2+'; '+ ' font-weight: #525452; '+ '}'+ '#'+JSId+' .x-label-el{ '+ ' display: none; '+ '}'+ '#'+JSId+' .x-input-el{ '+ ' display: none; '+ '}'+ '#'+JSId+' .x-input-wrap-el{ '+ ' border: none; '+ '}'+ '#'+JSId+' .x-after-input-el{ '+ ' width: 100%; '+ ' background-color: white; '+ '}'+ '#'+JSId+' .x-filetrigger{ '+ ' width: 100%; '+ // ' margin-left: 1em; '+ '}'+ '#'+JSId+' .x-button-action{ '+ ' width: 100%; '+ ' height: 100%; '+ '}'+ '#'+JSId+' .x-field{ '+ ' width: 100% !important; '+ '}' ]); end; end; // end; Above is code in MainModule - adding styles And this can change text of the button: UnimFileUploadButton1.JSInterface.JSAssign('element.dom.querySelector(".x-text-el").innerText', ['Upload file']);
    1 point
×
×
  • Create New...