Jump to content

Frederick

uniGUI Subscriber
  • Posts

    608
  • Joined

  • Last visited

  • Days Won

    2

Posts posted by Frederick

  1. Thanks. The GetBrowserName() function gives me the information I need.

    However, the BrowserType, OSType and BrowserVersion properties from UniApplication.ClientInfoRec do not return anything of value since the first two are blank strings and the third is a 0 regardless of the browser I run the app with.

  2. I have an SQLite table where there is a column that refers to a boolean field. The column's CheckBoxField.AutoPost property is set to True.

    In Firefox, I need two clicks to select or unselect the field. In Edge, Chrome and Opera, I need just one click.

    Why does Firefox need two clicks to auto post the field?

    P.S. I have attached the testcase.

    --
    Frederick
    (UniGUI Complete - Professional Edition 1.90.0.1549)
     

    click2select.zip

  3. I am using the following code to try to get the browser name but all I am getting is "Others". It is the same whether I run in Firefox, Chrome, Edge or Opera.

    var
       ClientInfo : TUniClientInfos;
    begin
       ClientInfo:=UniApplication.ClientInfo;
       if ciIE in ClientInfo then
          Result := 'IE'
       else if (ciFireFox in ClientInfo) or (ciFirefox2 in ClientInfo) or (ciFirefox3 in ClientInfo) then
          Result := 'FireFox'
       else if ciOpera in ClientInfo then
          Result := 'Opera'
       else if ciSafari in ClientInfo then
          Result := 'Safari'
       else if ciChrome in ClientInfo then
          Result := 'Chrome'
       else
          Result  := 'Other';
    end;

    Additionally, how do I detect the Microsoft Edge browser and the version number of any browser?

    --
    Frederick
    (UniGUI Complete - Professional Edition 1.90.0.1549)
     

  4. I have three controls that have their TabStop properties set to False at design time. When I set the TabStop properties to True at runtime, I cannot tab from control to control.

    Is this a bug?

    Interestingly, if the TabStop properties are True at design time and I set the TabStop properties to False at runtime, the behaviour is correct, in that I cannot tab from control to control.

    P.S.    I have attached the testcase.

    --
    Frederick
    (UniGUI Complete - Professional Edition 1.90.0.1549)
     

    tabruntime.zip

  5. When printing a report in Firefox, I get the attached Ajax error. The same report printed in Chrome, Edge or Opera does not display the error.

    I am using a TUniURLFrame to display the PDF file and in the control's OnFrameLoaded event, I have the following code:-

    TUniURLFrame.JSInterface.JSCode(#1'.iframe.contentDocument.addEventListener("keydown", function(e){ajaxRequest('+ Self.WebForm.JSForm.JSName +', "keydown", ["key="+e.keyCode])});')

    What am I missing here?

    --
    Frederick
    (UniGUI Complete - Professional Edition 1.90.0.1546)

     

    errorprintfirefox.png

  6. Thanks. Adding a semi colon after the closing bracket solved the problem.

    Ext.override(Ext.form.field.Checkbox, {
        onBlur: function() {
            this.displayEl.removeCls('x-form-checkbox-focus');
            this.callParent(arguments);
        }
    });   /* Added semi colon here */

    Ext.form.field.Date.prototype.altFormats = "dmY|m/d/Y|n/j/Y|n/j/y|m/j/y|n/d/y|m/j/Y|n/d/Y|m-d-y|m-d-Y|m/d|m-d|md|mdy|mdY|d|Y-m-d|n-j|n/j";  /* Adding this line */

  7. I am trying to add a script to the Mainform's script property but the additional code gives an Ajax error. What part am I doing wrong?

    Ext.override(Ext.form.field.Checkbox, {
        onBlur: function() {
            this.displayEl.removeCls('x-form-checkbox-focus');
            this.callParent(arguments);
        }
    })

    Ext.form.field.Date.prototype.altFormats = "dmY|m/d/Y|n/j/Y|n/j/y|m/j/y|n/d/y|m/j/Y|n/d/Y|m-d-y|m-d-Y|m/d|m-d|md|mdy|mdY|d|Y-m-d|n-j|n/j";  /* Adding this line */

    --
    Frederick
    (UniGUI Complete - Professional Edition 1.90.0.1546)

  8. Debug Output:
    onecore\com\combase\catalog\catalog.cxx(1026)\combase.dll!00007FFD1EF29FE6: (caller: 00007FFD1EF1CC0D) ReturnHr(1) tid(4e64) 80070002 The system cannot find the file specified.

    Recently, I have been getting multiples of the above error when I compile and run a UniGUI app in debug mode. When it is compiled and run the first or second time, there is no problem. After that, the errors appear in the compile log and the app will not start in the browser. I can only resolve the problem when I restart Delphi.

    I can't seem to repeat the problem in a VCL application in debug mode.

    What can I do to fix this problem?

    --
    Frederick
    (UniGUI Complete - Professional Edition 1.90.0.1546)
     

  9. I have a TUniEdit and a TUniDBGrid. The MainForm has the NavigateKeys property enabled with the Next's Key property set to 13.

    In the TUniEdit's OnExit event, I have some code that fires when the event is triggered.

    When I attempt to press the ENTER or Tab key from the TUniEdit to focus to the TUniDBGrid, the grid cannot be focused to and the OnExit event is not fired.

    How do I get the focus to change to the grid?

    A testcase is attached.

    --
    Frederick
    (UniGUI Complete - Professional Edition 1.90.0.1546)
     

    gridnofocus.7z

  10. I have a TUniDBFormattedNumberEdit that is bound to an SQLite table. When I exit the control and I detect that the text property is blank, I assign a default value.

    For some reason, when I assign any number other than -1.00, the text property shows the value assigned. If I assign -1.00, the text property remains blank.

    Is this a bug and how do I work around it?

    A video showing the problem and a testcase is attached.

    --
    Frederick
    (UniGUI Complete - Professional Edition 1.90.0.1546)
     

    editnotext.7z

  11. My TUniPanel's caption is "This is line 1 This is line 2".

    I want the lines to appear as:

    This is line 1
    This is line 2

    I tried TUniPanel.Caption:='This is line 1'+#13#10+'This is line 2' and TUniPanel.Caption:='This is line 1<br/>This is line 2' but the results are not as expected.

    How to I get this to work?

    --
    Frederick
    (UniGUI Complete - Professional Edition 1.90.0.1546)
     

×
×
  • Create New...