Components in a list for use with all components

Hi all

I have come over from AI2 to this hopefully better system but have an issue with the using ‘any component’

I have made a list of button components then using the ‘for each item’ loop i want to change the text of each button in the list from some json data

the way i have shown doesent seem to work and the text for house4 button does not show as 3, it shows as some long alphanumeric number.

if i change my ‘house’ list to just numbers and create the component list inside the ‘set button in list’ section. it all works fine and house4 text becomes 3

to me it appears that you cannot put componants into a list which I could do in AI2

any help would be appreciated or if this is a bug

thanks

Zee

2 Likes

You can but a adding a ‘house1’ Will return it’s ID wich is a number and not it’s name.

You should Just Place numbers in the list.

-luke

1 Like

The “j” will give you the entry in the list so you should say
set button j’s text to …

The other issue is the get property with the join text, you are actually saying house1house, house2house, house3house. Is this the key name in the JSON?

2 Likes

thanks guys.

j does return the contents of each item in the list, not the ID so either solution will work but have gone to - change button ‘j’ text and added a k=k+1 for the json ID

thanks for the quick replies

2 Likes

Glad you solved your issue

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.