Announcement

Collapse
No announcement yet.

Page.CreateObject OBJECT_INPUT ReadOrder ignored

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Page.CreateObject OBJECT_INPUT ReadOrder ignored

    Hi there,

    I'm not sure if this has ever been reported before, I believe I did at some point during the development of Object.lmd.

    Code:
    Page.CreateObject(OBJECT_INPUT, "test", {
        Alignment = 0;
        BackgroundColor = 16777215;
        Border = 2;
        Enabled = true;
        FontAntiAlias = true;
        FontColor = 0;
        FontItalic = false;
        FontName = "Segoe UI";
        FontScript = 0;
        FontSize = 9;
        FontStrikeout = false;
        FontUnderline = false;
        FontWeight = 400;
        HScrollbar = false;
        Height = 23;
        InputStyle = 0;
        MaskReturnMode = 0;
        MaskText = "";
        Multiline = false;
        Placeholder = " ";
        ReadOnly = false;
        ReadOrder = 0;
        ResizeBottom = false;
        ResizeLeft = false;
        ResizeRight = false;
        ResizeTop = false;
        Text = "";
        TooltipText = "";
        VScrollbar = true;
        Visible = true;
        Width = 200;
        X = 5;
        Y = 32;
    });​
    In AMS 8.5.0.0, Input.GetProperties("test").ReadOrder will result in `1` and Input.GetProperties("test").ReadOrderBoolean (an undocumented property) will also be true.
    Setting ReadOrderBoolean in CreateObject will not solve this issue. What would be a nice pure-AMS workaround?
    Bas Groothedde
    Imagine Programming :: Blog

    AMS8 Plugins
    IMXLH Compiler

  • #2
    Toggling WS_EX_RTLREADING on the Input's GWL_EXSTYLE does solve the weird Input behaviour, but the Input property still will tell you it's RTL.
    Bas Groothedde
    Imagine Programming :: Blog

    AMS8 Plugins
    IMXLH Compiler

    Comment


    • #3
      While I agree that it shouldn't be required, a
      Code:
      tProperties = {};
      tProperties.ReadOrder = 0;
      Input.SetProperties("test", tProperties);
      right after the Page.CreateObject() appears to set the property properly for me, with AutoPlay Media Studio 8.5.3.0

      Ulrich​

      Comment


      • #4
        Originally posted by Ulrich View Post
        While I agree that it shouldn't be required, a
        Code:
        tProperties = {};
        tProperties.ReadOrder = 0;
        Input.SetProperties("test", tProperties);
        right after the Page.CreateObject() appears to set the property properly for me, with AutoPlay Media Studio 8.5.3.0

        Ulrich​
        Indeed, that does fix the RTL problem. Interesting, I always thought that for SetProperties you had to do a GetProperties to preserve the properties you didn't want to change.
        Thanks, this might be a clean solution in my context.
        Bas Groothedde
        Imagine Programming :: Blog

        AMS8 Plugins
        IMXLH Compiler

        Comment


        • #5
          There also seems to be a problem with creating a ListBoxType of LB_CHECKLISTBOX with Page.CreateObject.
          I cannot remedy this with a SetProperties, as that causes the items to not be added afterwards.

          Code:
          -- no checkboxes after creation
          Page.CreateObject(OBJECT_LISTBOX, "object_type_exclusion_list", {
              FontScript = 0;
              FontSize = 9;
              VScrollbar = true;
              Border = 1;
              ResizeBottom = false;
              MultipleSelection = false;
              Sort = false;
              FontItalic = false;
              FontStrikeout = false;
              ResizeTop = false;
              ListBoxType = LB_CHECKLISTBOX;
              FontAntiAlias = true;
              HScrollbar = false;
              ResizeRight = true;
              FontWeight = 400;
              TooltipText = "";
              BackgroundColor = 4278190080;
              Visible = true;
              FontName = "Segoe UI";
              Width = 200;
              Y = 5;
              X = 210;
              Enabled = true;
              ReadOrder = 0;
              Height = 146;
              ResizeLeft = false;
              FontUnderline = false;
              TextColor = 12632256;
          });
          
          -- uncomment next line and no items will show up anymore
          -- ListBox.SetProperties("object_type_exclusion_list", {ListBoxType = 1});
          
          for i = 1, 5 do
              ListBox.AddItem("object_type_exclusion_list", "Item #"..tostring(i), tostring(i));
          end  ​​
          Bas Groothedde
          Imagine Programming :: Blog

          AMS8 Plugins
          IMXLH Compiler

          Comment


          • #6
            Another problem with ListBox; e_Key will never be 9, making me believe that the tab key is not forwarded to the event. This is true even when _AutoTabOrder is false.
            When I dynamically create a ListBox through Page.CreateObject, _AutoTabOrder no longer works (even after setting ZOrder). This means it has to be done through code,
            but this appears to be impossible too without the use of plugins.
            Bas Groothedde
            Imagine Programming :: Blog

            AMS8 Plugins
            IMXLH Compiler

            Comment

            Working...
            X