Jump to content

picyka

uniGUI Subscriber
  • Posts

    1082
  • Joined

  • Last visited

  • Days Won

    34

Everything posted by picyka

  1. Has anyone used nginx with websocket? if yes, how to solve 60s timeout any tips will be welcome.
  2. Just out of curiosity, what is a person going to do with 100,000 records on the screen?
  3. function store.nodeappend(sender, node, index, eOpts) { var _this=this; this.treePanel.getItem(node).el.on('mouseover', function() { textMetrics = new Ext.util.TextMetrics(); tWidth = textMetrics.getWidth(node.data.text); tWidth += (35 * node.data.depth); tWidthMenu = _this.treePanel.getWidth(); if (_this.treePanel.getEl().getHeight() !== _this.treePanel.getEl().dom.scrollHeight) { tWidthMenu -= 40; } if (tWidth > tWidthMenu) { _this.treePanel.getItem(node).el.dom.setAttribute('data-qtip', node.data.text); } }); this.treePanel.getItem(node).el.on('mouseout', function() { _this.treePanel.getItem(node).el.dom.setAttribute('data-qtip', ''); }); } It was like this. For me to understand, in your code you are introducing a function in the obj TreeMenu? function afterCreate(sender) { sender.isScfrollVisible = function() { return sender.treeMenu.getEl().getHeight() !== sender.treeMenu.getEl().dom.scrollHeight } }
  4. tWidth += (50 * node.data.depth); tWidthMenu = _this.treePanel.getWidth(); if _this.treePanel.scrollBarIsVisible { tWidthMenu -= 15 } if (tWidth > tWidthMenu) { _this.treePanel.getItem(node).el.dom.setAttribute('data-qtip', node.data.text); } I need to know if the scroolBar is visible, because if it were visible, the width of the menu would be smaller. I made an example code, I don't know if there's a way to know if the scroll is visible
  5. {$IFDEF DEBUG} Self.BackButtonAction := bbaDoNothing; {$ELSE} Self.BackButtonAction := bbaWarnUser; {$ENDIF}
  6. In my case here, sometimes I have the scrollbar active, I would have to know that it is active and discount the width of the menu
  7. Я думаю, что я передал неправильный вариант, есть один, который спрашивает, хочет ли пользователь выйти из приложения.
  8. Testing better here, it doesn't work as expected, it would be nice if you know that the menu has...
  9. function store.nodeappend(sender, node, index, eOpts) { var _this=this; this.treePanel.getItem(node).el.on('mouseover', function() { textMetrics = new Ext.util.TextMetrics(); tWidth = textMetrics.getWidth(node.data.text); tWidth += (50 * node.data.depth); if (tWidth > _this.treePanel.getWidth()) { _this.treePanel.getItem(node).el.dom.setAttribute('data-qtip', node.data.text); } }); this.treePanel.getItem(node).el.on('mouseout', function() { _this.treePanel.getItem(node).el.dom.setAttribute('data-qtip', ''); }); } Sorted out
  10. if (tWidth > _this.treePanel.getWidth()) { _this.treePanel.getItem(node).el.dom.setAttribute('data-qtip', node.data.text); } The problem is with this rule.
  11. I have some rules there that prevent it from working, can you help me? Demo.zip
  12. picyka

    Update System

    We have to wait for the new version with webSocket to come out.
  13. Does your system have a memory leak?
  14. picyka

    Socket

    Good morning, I use 3 layers, so the socket server was out of unigui, by the tests I did it works. Note: It's still in testing, when it comes out native in unigui, I can change it.
  15. picyka

    Socket

    Bom dia, quem está procurando uma solução para socket, Eu recomendo https://github.com/mateusvicente100/bird-socket-server muito simples de usar Lembrando que o servidor de soquete deve ser separado do UNIGUI Cliente: class procedure TUniGUISocket.Connect(Main: TUniForm); begin var ServidorURL := 'ws://' + Self.GetServidor; var SocketName := 'ws_' + Main.WebForm.JSName; var lScript := ' try { ' + ' uniVars.' + SocketName + ' = new ReconnectingWebSocket("' + ServidorURL + '"); ' + ' uniVars.' + SocketName + '.addEventListener(''message'', function (event){ajaxRequest(' + Main.WebForm.JSName + ', "_socket", [''text='' + event.data]);}) ' + ' } ' + ' catch (e) { ' + ' console.log(''error socket open: '', e) ' + ' };'; Main.UniSession.AddJS(lScript); end; class procedure TUniGUISocket.Disconnect(Main: TUniForm); begin var ServidorURL := 'ws://' + Self.GetServidor; var SocketName := 'ws_' + Main.WebForm.JSName; var lScript := ' try { ' + ' uniVars.' + SocketName + '.close() ' + ' } ' + ' catch (e) { ' + ' console.log(''error socket close: '', e) ' + ' };'; Main.UniSession.AddJS(lScript); end; class procedure TUniGUISocket.ProcessMessage(Main: TUniForm; _Mensagem: String); begin if _Mensagem = _NEW_VERSION then begin if TMessageUtils.Question('A uma nova versão disponível, para evitar qualquer instabilidade é necessário atualizar.' + sLineBreak + '<b>Deseja atualizar agora?</b>', 'Atenção') = mrYes then begin UniSession.Logout; UniApplication.Restart; end; end else if _Mensagem = _NEW_AUTH then TMainForm(Main).UniTimerRecoonectSocket.Enabled := True else if _Mensagem = _LOGIN_SUCESS then TMainForm(Main).UniTimerRecoonectSocket.Enabled := False; end; class procedure TUniGUISocket.Send(Main: TUniForm; Value: String); begin var ServidorURL := 'ws://' + Self.GetServidor; var SocketName := 'ws_' + Main.WebForm.JSName; var lScript := ' try { ' + ' uniVars.' + SocketName + '.send(''' + Value + ''') ' + ' } ' + ' catch (e) { ' + ' console.log(''error socket send: '', e) ' + ' };'; Main.UniSession.AddJS(lScript); end; Só para contribuir com a comunidade. Sobre o cliente que eu estou usando GitHub - joewalnes/reconconnecting-websocket: Um pequeno decorador para a API JavaScript WebSocket que se reconecta automaticamente Reconectando o WebSocket espero que seja útil para alguém, Hugs.
  16. I will report my scenario here, VPS 4gb RAM, 2 core, SSD API: XData DB: Postgres Sessions: 30-50 Server is still quiet
  17. picyka

    TUniPDFFrame

    Worked perfectly
  18. picyka

    TUniPDFFrame

    Test with example C:\Program Files (x86)\FMSoft\Framework\uniGUI\Demos\Desktop\PDFViewer - UniPDFFrame (does not work) PDF sent in private
  19. Are the system logs showing any errors? Or even the windows logs
  20. Does your server have a good configuration, should it be fast, a doubt, the whole system is slow, or some specific routine? What would be the server latency?
×
×
  • Create New...