Array in interface not displaying text

Home Forums Problems and solutions in GDL Graphical UI and parameters list Array in interface not displaying text

Viewing 7 reply threads
  • Author
    Posts
    • #3592
      Bruce Walker
      Participant

      I have an array parameter (shelf_fixing) declared as an integer type. In the parameter script I have this statement:

      VALUES{2} “shelf_fixing” 0, “Fixed”, 1, “Adjustable”

      When I open the array, it works as expected. However, when listing out the individual fields in the interface, I get a ‘0’ and a ‘1’ displayed…but when you click on the arrow, ‘Fixed’ and ‘Adjustable’ are there to be selected. Why is this?

      www.brucepwalker.com
      https://www.mindmeister.com/65450406

      AC20 6005 AUS Full & AC 21 3009 NZE Full | Win 10 Pro 64 | Intel i7-7700HQ 2.80GHz | 16 Gb RAM
      NVIDIA GeForce GTX 1060 8Mb

    • #3594
      Joachim Sühlo
      Participant

      Which UI_INFIELD command do you use?

      GDL Object Developer
      b-prisma
      MAC OSx 10.12

    • #3595
      Bruce Walker
      Participant

      UI_INFIELD{2}

      This is the line:
      UI_INFIELD{2} shelf_fixing[i], ui_x3, ui_y, ui_in_w1, ui_in_h1 UI_TOOLTIP “Shelf fixing”

      www.brucepwalker.com
      https://www.mindmeister.com/65450406

      AC20 6005 AUS Full & AC 21 3009 NZE Full | Win 10 Pro 64 | Intel i7-7700HQ 2.80GHz | 16 Gb RAM
      NVIDIA GeForce GTX 1060 8Mb

    • #3597
      Joachim Sühlo
      Participant

      In my opinion this must be a bug in AC 19, 20, 21. I have no idea for a woraround, except using old VALUES (without {2})

      GDL Object Developer
      b-prisma
      MAC OSx 10.12

    • #3598
      Bruce Walker
      Participant

      The code above didn’t display quite right, due to square brackets. Imagine the normal brackets below are actually square brackets:

      UI_INFIELD{2} shelf_fixing(i), ui_x3, ui_y, ui_in_w1, ui_in_h1 UI_TOOLTIP "Shelf fixing"

      Probably won’t make any difference, though.

      www.brucepwalker.com
      https://www.mindmeister.com/65450406

      AC20 6005 AUS Full & AC 21 3009 NZE Full | Win 10 Pro 64 | Intel i7-7700HQ 2.80GHz | 16 Gb RAM
      NVIDIA GeForce GTX 1060 8Mb

    • #3600
      Péter Baksa
      Keymaster

      Hi,

      use UI_INFIELD{3} or UI_INFIELD{4} with method 2 or 8. There are some examples here

      Péter Baksa
      Library Platform, Software Engineer
      GRAPHISOFT SE

    • #3607
      Bruce Walker
      Participant

      Thanks Peter. I have used UI_INFIELD{3} before with text arrays, but am having trouble getting it working for integer arrays. I’ll keep persisting.

      In the meantime, I cheated, and put a secondary OUTFIELD on top of the INFIELD to mimic what I want. It’s suitable as a workaround.

      Cheers

      www.brucepwalker.com
      https://www.mindmeister.com/65450406

      AC20 6005 AUS Full & AC 21 3009 NZE Full | Win 10 Pro 64 | Intel i7-7700HQ 2.80GHz | 16 Gb RAM
      NVIDIA GeForce GTX 1060 8Mb

      • #3639
        Dominika Bobály
        Keymaster

        Try this, please:
        UI_INFIELD{3} shelf_fixing(3), 10, 70, 150, 19,
        8, “”,
        0, 0, 0, 0, 0, 0,
        “”, “Fixed”, 0,
        “”, “Adjustable”, 1 UI_TOOLTIP “Shelf fixing”

        UI infield types of old are not always prepared to handle array params on UI. You have to use infield version 3 instead of 2 for arrays. It both works for integer and string types as well.
        In case “shelf_fixing” is a string type array, the UI works like this (both version 2 and 3 are okay):
        UI_INFIELD{2} shelf_fixing(3), 10, 70, 150, 19
        Or, to have the nicer text popup use:
        UI_INFIELD{3} shelf_fixing(3), 10, 70, 150, 19,
        8, “”,
        0, 0, 0, 0, 0, 0,
        “”, “Fixed”, “Fixed”,
        “”, “Adjustable”, “Adjustable” UI_TOOLTIP “Shelf fixing”

        Of course in string type case the paramscript should be:
        values “shelf_fixing” “Fixed”, “Adjustable”

        Good luck.

        Dominika Bobály
        Library Developer, Library Team
        GRAPHISOFT SE

    • #3648
      Bruce Walker
      Participant

      Thanks Dominika

      www.brucepwalker.com
      https://www.mindmeister.com/65450406

      AC20 6005 AUS Full & AC 21 3009 NZE Full | Win 10 Pro 64 | Intel i7-7700HQ 2.80GHz | 16 Gb RAM
      NVIDIA GeForce GTX 1060 8Mb

Viewing 7 reply threads
  • The forum ‘Graphical UI and parameters list’ is closed to new topics and replies.