pjaju
15 years agoOccasional Contributor
Jtree loading
I am working with JTree object and using the ClickItem method to click on a particular tree node. My question is that, if the node is not found, TC throws error. However, when i open my application, it takes a bit of time to load the tree nodes. While the tree is loading, if i use ClickItem, TC throws an error saying that the object was not found. Once the tree is loaded fully, the command works fine.
I want to know how can i tackle this situation. Can i use a loop:
Do
Call Aliases.Java_Explorer.Explorer_Main.SwingObject("ExplorerFrame$4", "", 0).SwingObject("null.layeredPane").SwingObject("null.contentPane").SwingObject("YPanel", "", 0).SwingObject("YPanel", "", 0).SwingObject("YSplitPane", "", 0).SwingObject("YSplitPane$InternalSplitPane", "", 0).SwingObject("YSplitPane", "", 0).SwingObject("YSplitPane$InternalSplitPane", "", 0).SwingObject("ExplorerFrame$2", "", 0).SwingObject("YScrollPane", "", 0).SwingObject("JViewport", "", 0).SwingObject("ApplicationScreenSelector", "", 0).SwingObject("Tree").ClickItem("App|Viewers|Stores|Report1")
Until <no error is thrown>
I want to know how can i tackle this situation. Can i use a loop:
Do
Call Aliases.Java_Explorer.Explorer_Main.SwingObject("ExplorerFrame$4", "", 0).SwingObject("null.layeredPane").SwingObject("null.contentPane").SwingObject("YPanel", "", 0).SwingObject("YPanel", "", 0).SwingObject("YSplitPane", "", 0).SwingObject("YSplitPane$InternalSplitPane", "", 0).SwingObject("YSplitPane", "", 0).SwingObject("YSplitPane$InternalSplitPane", "", 0).SwingObject("ExplorerFrame$2", "", 0).SwingObject("YScrollPane", "", 0).SwingObject("JViewport", "", 0).SwingObject("ApplicationScreenSelector", "", 0).SwingObject("Tree").ClickItem("App|Viewers|Stores|Report1")
Until <no error is thrown>