Jump to content
uniGUI Discussion Forums

delagoutte

uniGUI Subscriber
  • Content Count

    412
  • Joined

  • Last visited

  • Days Won

    7

delagoutte last won the day on February 1

delagoutte had the most liked content!

Community Reputation

24 Excellent

About delagoutte

  • Rank
    Advanced Member

Profile Information

  • Gender
    Not Telling
  • Location
    France - Pays Basque

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. delagoutte

    Unisession.AddJs for elementes inside a UrlFrame

    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.
  2. delagoutte

    Unisession.AddJs for elementes inside a UrlFrame

    if you use your webbrowser inpesctor, your grid have the good Id ?
  3. delagoutte

    translate the "Back" button

    in this example : open unit1.dfm unimform1.TitleButtons -> there is one button . there is a property caption with "Back" you could change it
  4. delagoutte

    TUniCustomDBGrid.MoveToRow(): Unexpected Row number: 0, 3.

    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
  5. delagoutte

    How to gradually feed a memory table. Best way for do this

    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 ?
  6. 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;
  7. Bonjour Mr Delagoutte,

    De la part d'un autre utilisateur français d'UniGUI.

    peut être des choses à échanger ...

     

    Cordialement.

    Guillaume Le Meur

  8. delagoutte

    CHANGE BACKGROUND COLOR BUTTON [SOLVED]

    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;
  9. delagoutte

    uniimage.picture.loadfromfile trouble

    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 ???
  10. delagoutte

    uniimage.picture.loadfromfile trouble

    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 ...?
  11. delagoutte

    uniimage.picture.loadfromfile trouble

    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
  12. delagoutte

    uniURLFrame with SSL

    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
  13. delagoutte

    About TUniRadioGroup.Caption

    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'; } } }
  14. delagoutte

    Grid Filter date/number/boolean/list

    do you think it will be possible ?
  15. delagoutte

    DBGrid column sort clear(reset)

    for cancel all sort you can use this : UniSession.AddJS('if ('+aGrid.JSName + '.getStore().sorters != null) {'+aGrid.JSName + '.getStore().sorters.clear();};');
×