Jump to content

delagoutte

uniGUI Subscriber
  • Posts

    587
  • Joined

  • Last visited

  • Days Won

    12

Everything posted by delagoutte

  1. anybody could help, farshad ? other ? I have produced a theme with sencha themer based on triton. where should I put the files produced by themer ? unipackage-6.5.3 ? other directory ? We must create other files ? what should I do for my theme to appear in the list of themes available in unigui ? it's been months that I ask on different post without ever having a complete answer with good practices. Would it finally be possible to have one?
  2. Hello, i have a grid with a onselectionchange in this event i have a code like this procedure TMainForm.MygridSelectionChange(Sender: TObject); begin MyFrame.LoadData; end; I would like to know what it is the best method to be certain that I do not enter many times in parallel in this portion of code Loaddata. What is the good method for be sure TCriticalsession unisession.locksession , ... other ? If i use TCriticalSection, i think that i have this portion of code that will be locked/protected for all session but i would protect it only for the usersession.
  3. have you try tab index : https://webcheatsheet.com/HTML/controll_tab_order.php
  4. for me, i don't see a big difference. i often use "unread content" and i must wait 4-5 sec or little more before receive anything.
  5. i had the same problem with my custom css when i updated my project from 1.0 to 1.5 version : for resum : before (with 1.0 version and extjs 4): x-grid-row-selected , x-grid-row-...... after (with 1.5 version and extjs 6) : x-grid-item-selected, x-grid-item-......
  6. is there a method for do this ?(import in unigui a theme produce by sencha themer)
  7. i have a theme that is produce by themer. How can i add it to unigui and use it ?
  8. i have a unidbgrid with option for having a column with check box for the selection. How can ido for having this column that is always display ? how to fix it ? if you have a grid with many column, -> there is a horizontal scrollbar -> if you scroll on the right, this column for selec row is not displayed
  9. it is attach to this message framecommunication.zip in directory \exe\files\ there is the html frame page
  10. yes, i think it is a protection/restriction problem. i had this problem, for this, i implemented a communication "protocol" between unigui application and iframe based on postmessage. i use this sample : https://gist.github.com/pbojinov/8965299 it is simple to adapt in unigu but if you want i could retreive the sample that i made.
  11. if you use your webbrowser inpesctor, your grid have the good Id ?
  12. in this example : open unit1.dfm unimform1.TitleButtons -> there is one button . there is a property caption with "Back" you could change it
  13. i have a similar problem but i can reproduce in all case. In my grid, i apply many filter on datasource that reload data in grid and as for erich.wanker, the issue seem to be displayed randomly when we use the selectall checkbox i am using 1472 version
  14. it is not really my problem but i advance i do a little test case and i use this code : procedure TMainForm.UniButton1Click(Sender: TObject); var curdate : TDate; cnt : Integer; FS : TUniGUISession; B : TBookmark; havenewrec : Boolean; begin curdate := IncMonth(now,-36); UniMainModule.FDQuery1.Close; UniMainModule.FDQuery1.SQL.Text := 'SELECT AO_KEYID, AO_REF, AO_DATEPUB FROM TB_AO WHERE AO_DATEPUB BETWEEN :DATE1 AND :DATE2 order by ao_datepub asc'; cnt := 0; while (curdate <now) do begin havenewrec := false; UniMainModule.FDQuery1.close; UniMainModule.FDQuery1.ParamByName('DATE1').AsDate := curdate; UniMainModule.FDQuery1.ParamByName('DATE2').AsDate := IncMonth(curdate,1); UniMainModule.FDQuery1.Open; try B := UniMainModule.FDMemTable1.GetBookmark; try if UniMainModule.FDMemTable1.FieldDefs.Count=0 then begin unimainmodule.CloneQueryFieldsToMemTableField(UniMainModule.FDQuery1, UniMainModule.FDMemTable1); UniMainModule.FDMemTable1.CreateDataSet; end; UniMainModule.FDQuery1.First; while not UniMainModule.FDQuery1.Eof do begin havenewrec := True; UniMainModule.FDMemTable1.append; UniMemo1.Lines.Add(UniMainModule.FDQuery1.FieldByName('AO_REF').asstring); UniMainModule.CloneQueryDataToMemTableData(UniMainModule.FDQuery1, UniMainModule.FDMemTable1); UniMainModule.FDMemTable1.Post; UniMainModule.FDQuery1.Next; Sleep(5); Inc(cnt); end; if not Assigned(B) then UniMainModule.FDMemTable1.First else UniMainModule.FDMemTable1.GotoBookmark(B); finally UniMainModule.FDMemTable1.FreeBookmark(B); end; finally if havenewrec then UniSession.Synchronize(true); end; curdate:= IncMonth(curdate,1); end; end; procedure TMainForm.UniDBGrid1SelectionChange(Sender: TObject); begin Self.Caption := UniMainModule.FDMemTable1.FieldByName('AO_KEYID').AsString; end; i add synchronize (true) on grid , i disabled editing and disabled load mask On this gif, you can see many things like the data arrived gradually but on each click on row i must have the value of first column in form caption and you can see that don't work when the data are loaded, the click have no effect. propably because grid always load data. how can i do for having a user experience more fluid ?
  15. i have database query that could be very long in some case. for example, we can say that the query return a result after 60s (so it is too long for a good user experience on web) the query could be like that : select * from MY_TABLE WHERE MYDATE BETWEEN '01.01.2017' and '01.01.2018' the think that i would do : cut main query in sub query. i think i could do a think like this : use a grid linked to a TFDMemtable. execute a first query in a TFDQuery : select * from MY_TABLE WHERE MYDATE BETWEEN '01.01.2017' and '08.01.2017' -> add result of fdquery to the FDMemTable execute a second query in a TFDQuery : select * from MY_TABLE WHERE MYDATE BETWEEN '09.01.2017' and '16.01.2017' -> add result of fdquery to the FDMemTable ..... so with this method i gradually feed the FDMemTable Now my problem is : what is the best way to do this with unigui and show new data in client side when subquery are finished. what is the best way ? - unithreadtimer for execute sub query with a unitimer for sync client side ? (like in unithreadtimer-2 and 3 sample) -unisession.synchronize after add record in fdmemtable ? - other method ? could you give me your opinion ? have you ever done that and what approach did you use to code it ? more info, maybe it will be more clear with code : var curdate : TDate; begin curdate := IncMonth(now,-36); UniMainModule.FDQuery1.Close; UniMainModule.FDQuery1.SQL.Text := 'SELECT MyField1, MyField2, MyField3 FROM mytable WHERE Field_DATEPUB BETWEEN :DATE1 AND :DATE2'; while (curdate <now) do begin UniMainModule.FDQuery1.ParamByName('DATE1').AsDate := curdate; UniMainModule.FDQuery1.ParamByName('DATE2').AsDate := IncMonth(curdate,1); UniMainModule.FDQuery1.Open; if UniMainModule.FDMemTable1.FieldDefs.Count=0 then begin unimainmodule.CloneQueryFieldsToMemTableField(UniMainModule.FDQuery1, UniMainModule.FDMemTable1); UniMainModule.FDMemTable1.CreateDataSet; end; UniMainModule.FDQuery1.First; while not UniMainModule.FDQuery1.Eof do begin UniMainModule.FDMemTable1.Append; UniMainModule.CloneQueryDataToMemTableData(UniMainModule.FDQuery1, UniMainModule.FDMemTable1); UniMainModule.FDMemTable1.Post; UniMainModule.FDQuery1.Next; end; UniSession.Synchronize;//<<---- here i want that the temp result was sended to the client but synchronize don't work in this case sleep(1000); curdate:= IncMonth(curdate,1); end; end;
  16. you could use a thing like that for change at runtime: if blue then begin UniSession.AddJS('$(''#'+MyUniGuiButon.JSId+''').removeClass(''BtnRed'')'); UniSession.AddJS('$(''#'+MyUniGuiButon.JSId+''').addClass(''BtnBlue'')'); end else begin UniSession.AddJS('$(''#'+MyUniGuiButon.JSId+''').removeClass(''BtnBlue'')'); UniSession.AddJS('$(''#'+MyUniGuiButon.JSId+''').addClass(''BtnRed'')'); end;
  17. Config that i used for testing your project : Dev computer : Virtual computer windows 8.1 x64 + delphi xe7 +unigui 1472 test : debug+ 32 bit Test Computer : physical pc Windows 10 x64 + chrome 69.0.3497.100 other thing : In the past i had strange problem with delphi on my unigui project. I deleted Myproject .drc and .rsm files and after all my problem disappeared maybe you have a similar problem ???
  18. have you got more info if you click on "further information ". on chrome devtool maybe there is more info in console, in network tab all calls have a return state 200 ? Maybe you have got an antivirus that analyze traffic and it is not fast enough or block traffic because there is a call every second ...?
  19. idem, i can't reproduce this issue with you sample, i try to reduce timer interval to 100ms but i can't reproduce issue client chrome 69.0.3497.100
  20. hum, i think there is no other solution than the one I proposed see : https://developer.mozilla.org/en-US/docs/Web/Security/Mixed_content/How_to_fix_website_with_mixed_content
  21. try simply this function boxready(sender, width, height, eOpts) { if (sender.legend) { if (sender.legend.el) { var legend=sender.legend.el; legend.dom.setAttribute('align', 'center'); //left, right legend.dom.style['width']="auto"; legend.dom.style['margin-bottom']="0px"; legend.dom.style['border-bottom']="0px"; var legendText=legend.select('.x-fieldset-header-text').elements[0]; legendText.style['color']="green"; legendText.style['font-size']="12px"; legendText.style['font-weight']="bold"; legend.dom.style['text-align']='center'; } } }
  22. for cancel all sort you can use this : UniSession.AddJS('if ('+aGrid.JSName + '.getStore().sorters != null) {'+aGrid.JSName + '.getStore().sorters.clear();};');
  23. if not, do you think it would be possible to have a tutorial?
×
×
  • Create New...