Hi! I have been receiving some issues regarding expecting a native object to be passed and some issues about strings and buttons. I am attempting to recreate NYT Connections.
I had to revamp your Table Arrangement (shudder) into nested Horizontal and Vertical Arrangements to allow the app to run visibly on different screen shapes.
The error in the Submit button Click event is because you failed to distinguish between the Button Components and their Text values when you set up your global lists.
(You also need a SelectedButtonComponents list.)
Use the Companion and the Do It facility to help you debug.
P.S. Consider writing a value procedure (function) that would accept a word and return the Button component that contains that word. The use the advanced list blocks to generate a list of Buttons from your list of words, and traverse that list.
I was able to get your code working (I guess) by adding two functions
a word to button converter, and
a button to word converter.
That way, I was able to build on your global selectedWordsList variable, without having to add an extra global list of selected buttons.
Then I scanned everywhere you were using that words list to feed a Button component, and convert accordingly.
You also needed to clear that selectedWordsList after all your Submit button work, otherwise it would not accept clicks past the 4th click of the first group.
From my play testing, it needs a bit more working syncing buttons to word lists when dealing with partially correct answers.