Any component Button

Hello, I am trying to use Any Component Blocks to set the names from a list of museums on a list of buttons to avoid repeating myself thus making the code more efficient. I have experimented with the following set of blocks but I cannot sort out the behavior since I keep getting the following message:
Property setter was expecting a com.google.appinventor.components. runtime.Button but got a YailList instead.
Any suggestions as to how I can sort this out? Here are my blocks

You need to select a button from global buttons to feed the Any Button block, using the same index as you used for museum names.

To @ABG's point, you iterate over the global buttons list in your procedure, but then you pass global buttons to the set Button.Text of component to block when you probably mean to pass item since it represents an individual button from the list.

1 Like

Thank you very much, it works perfect