Jump to content

Frederick

uniGUI Subscriber
  • Posts

    608
  • Joined

  • Last visited

  • Days Won

    2

Posts posted by Frederick

  1. I deleted the JS code in the BeforeInit event of the TUniFrame and set the properties of the above but the ENTER or Tab still does not move focus from one TUniEdit control to the next.

    Remember, the two TUniEdit controls are on a TUniFrame and not in the TUniForm.

  2. This one.

    function beforeInit(sender, config)
    {
       config.keyMap = {
            a: {
                handler: function() {
                    Ext.Msg.alert('key pressed', 'you have pressed a');
                }
            },
            F2: {
                handler: function() {
                  ajaxRequest(sender, '_F2', []);
                }
            },
            ESC: {
                handler: function() {
                  ajaxRequest(sender, '_ESC', []);
                }
            },
            DELETE: {
                handler: function() {
                  ajaxRequest(sender, '_DELETE', []);
                }
            }                
        }     
    }
  3. My earlier post concerns the display of angled brackets and where the entire caption has the same font colour.

    In this post, the app crashes without the display of anything. I only want the "2023" year to display in red.

  4. Why am I getting a "Missing ) in Arguments List" error for the following code?

          with TUniPanel do begin
             Caption:='No Transactions In All Ledgers For <font color="red">2023</font>';  
             JSInterface.JSCode('Ext.get('#1'.id+"_td").setHtml("'+ Caption +'");');
          end;

    If I change the caption to "No Transactions<br>In All Ledgers", there is no error.

    --
    Frederick
    (UniGUI Complete - Professional Edition 1.90.0.1562)

  5. I did more testing and this is weird but it works.

    1.   Set the TabStop properties for all controls to True at designtime

    2.   At runtime, I was able to change the TabStop properties to False and back to True at will.

    Note: It does not have to be from the OnReady event of the form.

    If the controls' TabStop properties are False at designtime, I cannot change the TabStop properties at runtime.

  6. 6 hours ago, Sherzod said:

    Okay. Confirmed.

    But why do you need such a case. For now, you can set this at designtime, and optionally set it to false/true at runtime.

     

    I have 3 users who are not allowed to edit fields and 1 user who is allowed. At design time, I set all fields to ReadOnly:=True and TabStop:=False. When the 1 user who is allowed to edit the fields logs in, I set the fields to ReadOnly:=False and TabStop:=True.

    As you have tested, setting the TabStop:=True at runtime does not work.

  7. 6 hours ago, Sherzod said:

    Hello,

    I don't understand what is not working for you. The test case does not give a complete picture of what is not working. Please check again.

    I have created a simpler project. All four controls have their TabStop properties disabled at design time.

    In the OnReady event of the form, I enabled the TabStop properties for all controls.

    When I try to tab from control to control during runtime, nothing happens.

    tabruntime.7z

  8. Thanks for the code. This seems to work.

    What advantage is there in using this code in UniGUIServerModuleHTTPDocument compared with in UniGUIServerModuleHTTPCommand?

  9. My app has one login form. Normally, when I call the app from the browser, the login form appears.

    If I put the following code in UniServerModule's OnHttpCommand event, the browser displays an "OK" and then stops. The login form does not show.

        AResponseInfo.ContentText:='OK';
        AResponseInfo.ContentType := 'text/plain';
        AResponseInfo.ResponseNo:=200;
        Handled:=True;

    How do get my app to return the response code of "OK" to my browser AND show the login form?

  10. I can't use "Handled:=True" because the app just returns "OK" and stops.

    I want the app to respond to the calling gateways and then proceed to the login screen.

  11. I have two gateways that calls my app for callback reasons. One of them expects a "200" response and the other needs the "OK" response. In UniServerModule's OnHttpCommand event, I added the following code:-

        AResponseInfo.ContentText:='OK';
        AResponseInfo.ContentType := 'text/plain';
        AResponseInfo.ResponseNo:=200;

    When I run the application, I get an "Ajax Error: OK is not defined" all the time.

    What am I missing here and is my above code correct in returning the responses to the gateways?

    --
    Frederick
    (UniGUI Complete - Professional Edition 1.90.0.1562)
     

  12. 16 minutes ago, Oliver Morsch said:

    I think CORS is normally active by default. Maybe they can confirure your IP to be allowed.

    The SMS gateway does have a IP whitelist option. If I specify one or more IP addresses to be whitelisted, only these IP addresses can access the gateway. I suppose this is the CORS configuration equivalent.

    Currently, I did not specify anything. So, any URL calls from my computer to the gateway should go through.

  13. 35 minutes ago, Oliver Morsch said:

    If you have the target server under control, then you can configure CORS there...

    It is a vendor-owned SMS gateway server so configuration control is out of the question.

    I am curious however. If Indy's TIdHttp or similar components can access the server and get a response code, why is it necessary to use complicated code and fiddle with CORS?

×
×
  • Create New...