Jump to content

arilotta

uniGUI Subscriber
  • Posts

    187
  • Joined

  • Last visited

  • Days Won

    3

Posts posted by arilotta

  1. Hello, I need a solution too for the same problem.

    In the following code:

    procedure TMainForm.UniButton1Click(Sender: TObject);
    begin
      try
        ShowMask( 'blocking mask...');
        unisession.synchronize;
    
        sleep(1000);
        showmessage('step 1');
     
        sleep(1000);
        showmessage('step 2');
    
        sleep(1000);
        showmessage('step 3');
      finally
        HideMask;
      end;
    end;

    the mask disappears between step 1 and step 2.

    The same behaviour applies to MessageDlg and ShowModal...

    Is there a solution ? Blocking masks should remain until they are explicitely hidden with command HideMask,

    this is the reason for putting them in a try.. finally block....


     

  2. Hi all,

    we would like to adopt HyperServer in our production environment, and we are undecided between:

    -  ISAPI Module Mode with Apache

    - Windows Service Mode

    UniGUI documentation states that both methods are suitable for production, we would like to know which one is the best in terms of:

    - performance

    - robustness

    And what are the advantages/drawbacks of the two methods ?

    Many thanks to anybody will share their experience/knowledge to help us choose the best solution.

    Andrea

  3. Hi, 

    I managed it to work, I attached a sample for anyone interested in.

    Basically, I replaced

    - all the occurrences of 'x-grid-row x-grid-data-row x-grid-row-selected' with 'x-grid-item x-grid-item-selected'

    - all the occurrences of 'x-grid-row x-grid-data-row' with 'x-grid-item'

    - I moved the initialization of the style from event OnAfterLoad to event OnSelectionChange:

    procedure TMainForm.UniDBGrid1SelectionChange(Sender: TObject);
    begin
      UniSession.AddJS(UniDBGrid1.JSName+'.view.getNode('+IntToStr(UniDBGrid1.CurrGridRow)+').className = ''x-grid-item x-grid-item-selected''; ');
    end;
     

    @Sherzod, if there is a better solution/implementation, please let me know.

    Thanks

     

    UniDbGrid_indicator_testcase.zip

  4. Hi Sherzod, I've attached a simple testcase. 

    I am trying to show a grid indicator on the first column of a grid, when dgRowSelect=FALSE, to show the user the current record.

    I don't want to use the standard cell color background to show the selected cell.

    Just see the SerUniDbGrid_indicator_testcase.zipverModule.CustomCSS; the supplied  image "right-arrow-button.png" should be put where the EXE is compiled (Win32\Debug)

    In the Main OnFormCreate I manage the grdi events cellModel.deselect and cellModel.selectionchange

    In addition in the grid OnAfterLoad event I force the "right-arrow-button" to have the style applied when the grid is loaded at the beginning.

    This solution used to work in EXTJS4, while in the newer EXTJS6 it has some problems, it hangs frequently.

    Just click on the grid, changing row and column to see the problem.

    Is there a better solution with EXTJS6 to achieve the desired behaviour ?

    Thank you

  5. No, I'm using cellModel.selectionchange and cellModel.deselect as above to draw a grid indicator on the first column,

    when grid has dgRowSelect=false and dgEditing=true

    See also my post: 

    Now this code is not working anymore...

  6. Hi Sherzod, the above approach is not working anymore in the new EXTJS.

    I tried to replace:

    - "x-grid-row x-grid-data-row"  with "x-grid-item"

    - "x-grid-row x-grid-data-row x-grid-row-selected"  with "x-grid-item x-grid-item-selected"

    but I did not work.

    Could you help me ?

  7. Thank you, it works. Done this way:

    procedure TMainForm.UniButton1Click(Sender: TObject);
    var r: Integer;
    begin
      r:=DBgridLista.CurrRow
      TExUniCustomDBGrid(DBgridLista).DoConfigureJSColumns(DBgridLista.DataSource.DataSet);
      DBgridLista.CurrRow:=;
    end;
  8. Hi Sherzod,

    going on porting our SW to EXTJS 6.

    I used the above solution to open/close the filters at runtime, and in EXTJS 4.2 it worked pretty well.

    In EXTJS6.5 calling "DoConfigureJSColumns"  makes the DbGrid lose the selection, the selected record is no longer highlighted

    and you need to click on the grid to select it again.

    Please find attached a simple test application, just select a record and push the ConfigureJSColumns button to recreate the issue.

    I tried to call something like:

    JSInterface.JSCall('view.refresh', []);

    but it does not work...

    thanks

    Andrea

    TestHints.zip

  9. Dear Sherzod, here your are. Please find attached a simple project. Look the two attached images:

    it seems that the computed width of the text in grid columns is not accurate.

    In image Hint_not _shown the hint should appear, because the text is not completely visible (it is cut).

    Just play resizing column PRESTAZIONE, you will find easily the problem.

    In the main form OnCreate event you can find the function "function viewready" used to prompt the hint, already reported above in the post.

    Please let me know

    Thanks !

     

    TestHints.zip

    Hint_shown.png

    Hint_not_shown.png

  10. I also used this piece of code to show tolltips when text was longer then cell width.

    Because I use custom fonts, I added just the following statement (after many attempts) to determine exactly

    the real size of the text.

    tm.bind(tip.triggerElement.parentNode);
    function viewready(sender, eOpts)
    {
        var tm = new Ext.util.TextMetrics();
        sender.view.tip = Ext.create('Ext.tip.ToolTip', {
            target: sender.view.el,
            delegate: sender.view.cellSelector,
            trackMouse: true,
            renderTo: Ext.getBody(),
            listeners: {
                beforeshow: function updateTipBody(tip) {
                    gridColums = sender.view.getGridColumns();
                    column = gridColums[tip.triggerElement.cellIndex];
    
                    record = sender.view.getRecord(tip.triggerElement.parentNode);
    
                    tm.bind(tip.triggerElement.parentNode); /* added this ! */
    
                    if (column.dataIndex !== '-1' && (column.getWidth() < (tm.getSize(record.data[parseInt(column.dataIndex)]).width) + 5)) {
                        tip.update(record.data[parseInt(column.dataIndex)]);
                    } else {
                        return false;
                    }
                }
            }
        });
    }

    Unfortunately, with the latest release with EXTJS 6.5, the previous code does not work well anymore, in fact the text width is not computed

    precisely anymore. Also with the new properties ShowToolTip for DBGrid columns , the width is not computed correctly, so many times the tooltip is not shown

    whereas it should be.

    My guess is that, due to the changed DBGrid structure in EXTJS 6.5, the element accessed with "tip.triggerElement.parentNode" is a wrong one.

    Does someone have a suggestion ?

    Thanks

    Andrea

     

  11. Hi Sherzod, 

    the linked post says that it is possible to have 2 different builds of Unigui on two different Delphi installations, and this

    would be very interesting. Could you supply installation instructions for such a configuraion ?

    But my question was a bit different.

    I would like to be able to have one single project, and compile it with two different Unigui builds.

    Where necessary, using a conditional define, I would like to compile different statements

    in order to be compatible with the compiling version.

    Hoping to have been clearer,

    thank you

    Andrea

  12. Hi all,

    I'm also trying to port my projects from release 1.00 to 1.50, and I'm finding many incompatibilities in CSS and JS.

    Is there a way to use a conditional compilation to differentiate the code based on the installed UniGUI build ?

    Something like:

      { IFDEF UNIGUI1.00}
    // old code

      { ELSIF UNIGUI1.50}

    // new code
      { ENDIF}

    Thanks in advance 

    Andrea

  13. Hi, thanks to all of you for the replies. 

    In fact I think that Volk65 is right, while Abaksoft is a little too strict.

    "global" procedures that do not access (in update mode) global variables should be fine.

    The issues arise when a global variable is set, while the following should be safe in a "global" procedure not belonging to a class:

    - create/read/set a local object

    - read/set procedure params

    - read a global variable

    What do you think ?

  14. Hi all,

    I was wondering if it is safe to use procedures not belonging to a class in UniGUI, for example:

    function IfThenElse(Condizione: Boolean; CondTrue: string; CondFalse: string): string;
    begin
      if Condizione then
        Result := CondTrue
      else
        Result := CondFalse;
    end;

    In the documentation, it is specified to not use global variables, but nothing is told about global procedures.

    Thanks for all the replies.

    Andrea

  15. I need to popup a dialog when the user presses F2 that allows them to insert custom pre-configured text in the component.

    Gerhard IV, your point is true, I changed the JS supplied by Sherzod in the following way, passing therefore only the F2 key via Ajax:

    function initialize(sender, eOpts)
    {
          var me=sender;
        me.getDoc().addEventListener("keydown", function(e){
          if (e.keyCode==113) {
            ajaxRequest(me, 'keydown', ['key='+e.keyCode])
          }
        });
    }

     

  16. Hi all, I'm very interested in this.

    We have a couple of applications written with build 1425 (ExtJS 4.2), and we want to plan the upgrade to the latest version, usign ExtJS 6.5.

    We need to test all the customizations that we made to the CSS and the custom JS code developed, in order to be sure it is compatible

    with Ext JS 6.5, and to change it were needed.

    In the meanwhile, we need to support the projects, so we need to be able to fix eventual issues and to upgrade them.

    Which is the most convenient way to have different versions of UniGUI installed on the same RAD Studio?

    It is necessay to change folder names to activate one version instead of another ? What about registry ?

     

    Please provide some simple steps (including installation) in order to have a development environment with multiple UniGUI versions.

     

    Thanks

    Andrea

  17. Hi all,

    changing by code the PageIndex of a TUniTbaShet does not change its position, like at the design time.

    I think there is the need to call some JS to have the TUniPageControl refreshed.

    Could someone help me please ?

    I found a thread to enable dragging the tabs at runtime, but I only need to change tab positions by code.

     

    Thanks

    Andrea

×
×
  • Create New...