Home › Forums › Problems and solutions in GDL › Graphical UI and parameters list › Array in interface not displaying text
Tagged: Array, interface, values{2}, ui_infield
- This topic has 8 replies, 4 voices, and was last updated 7 years, 3 months ago by
Bruce Walker.
-
AuthorPosts
-
-
October 17, 2017 at 09:30 #3592
Bruce Walker
ParticipantI 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?
Attachments:
www.brucepwalker.com
https://www.mindmeister.com/65450406AC20 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 -
October 17, 2017 at 17:35 #3594
Joachim Sühlo
ParticipantWhich UI_INFIELD command do you use?
GDL Object Developer
b-prisma
MAC OSx 10.14 -
October 17, 2017 at 19:17 #3595
Bruce Walker
ParticipantUI_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/65450406AC20 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 -
October 18, 2017 at 06:55 #3597
Joachim Sühlo
ParticipantIn 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.14 -
October 18, 2017 at 07:08 #3598
Bruce Walker
ParticipantThe 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/65450406AC20 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 -
October 18, 2017 at 09:22 #3600
Péter Baksa
KeymasterHi,
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 -
October 19, 2017 at 19:25 #3607
Bruce Walker
ParticipantThanks 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/65450406AC20 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-
October 31, 2017 at 13:55 #3639
Dominika Bobály
KeymasterTry 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
Product Manager
GRAPHISOFT SE
-
-
November 2, 2017 at 08:58 #3648
Bruce Walker
ParticipantThanks Dominika
www.brucepwalker.com
https://www.mindmeister.com/65450406AC20 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
-
-
AuthorPosts
- The forum ‘Graphical UI and parameters list’ is closed to new topics and replies.