1st arg can't be coerced to int

I am sure the fix is simple but I need to get past this.

I have 2 tables, and have this code in a button’s script.


The complaint is at the first , but even if I swap them I get the same error.

I see data in the tables on screen fine, they are populated from SQL queries.

The file just shows the button and the 2 tables.

The lower table has first five fields integer (1b)

I can provide the console error if need be

"TypeError: getComponent(): 1st arg can’t be coerced to int "

I appreciate any help/hints

You’re pointing to the wrong reference. Meaning, it’s trying to find a table inside your button. I suppose if you squeezed it very tightly… :wink:


data1=event.source.parent.getComponent("Table1a").data data2=event.source.parent.getComponent("Table1b").data

Also, You can use the “Insert Property Reference” button along the right-hand edge of the editor to browse to your property. That way the references are put in rightly.

Hope this helps!

Oh! And welcome to the forums, btw!

ok, I think I got it, missing the “.parent.” portion