How to update a table using a button in a different containe

I have a table in the root container, to help control the tab sequence between items I had to put a button in a new container called data_entry which is located in the root container, but when I use the button to update the table in the root container I get the following error:

Traceback (innermost last):
File “event:actionPerformed”, line 60, in ?
ValueError: Could not find parent window.

Configuration code on button:

table = event.source.parent.getComponent(“Table”)
fpmi.db.refresh(table, “data”)

If your table is on the root container but your button is in a sub-container, you have to go back a level further to get a reference from the button to the table i.e.table = event.source.parent.parent.getComponent("Table") fpmi.db.refresh(table, "data")Al

Al is right, but that error looks suspicious. What version are you running?

version 3.3.0

Sorry, that error message is normal after all. It just means that the “table” variable is “None” which is what Al’s tip will fix.