Call table propertyChange event from other table Event

Dear Inductive Team,

We had 2 tables (Say Table1, Table2) in our Window. Some script has been written for Table1 propertyChange event. The script for Table2 propertyChange will be similar to Table1’s. Is it possible to call Table1 propertyChange event directly like Table1.propertyChange() ?

Through forum, we know that we can call Button Click event using Button1.doClick(). Is it possible to call same way other events as well ? We can think of using Script Modules for common function. However, it would be nice to call event directly.

No, you have to make some property change. In this case we usually add a custom property to the table that is an integer. You can make the integer change which will fire the event again. Your propertyChange script will look like:if event.propertyName in ["data", "refreshProp"]: # your code hereYou can just increase the integer by 1 every time to refresh.

Travis,

We understand your idea. Let us slightly tilt our question. Is it possible to call table Mouse Click event from anther Table mouse click event like:

# Table2 Mouse Clicked Event.
Table1.mouseClicked()

You could use a Java Robot, but this requires that the component that needs to be clicked is on the screen at the time that this script is executed. It will also move the mouse pointer onto the component that needs to be clicked.

from java.awt import Robot
from java.awt.event import InputEvent

pt = event.source.parent.getComponent("Level Indicator").getLocationOnScreen()
x = int(pt.getX())
y = int(pt.getY())
rob = Robot()
rob.mouseMove(x,y)
rob.mousePress(InputEvent.BUTTON1_MASK)
rob.mouseRelease(InputEvent.BUTTON1_MASK)

Thank you James.

This gives us a way for finding our required solution.