on the Event Handlers Script, visionWindow, visionWindowOpened of my window I have
event.source.getComponent(“rootContainer”).getComponent(“txtTranxferID”).requestFocusInWindow()
this returns, TypeError: getComponent(): 1st arg can’t be coerced to int
When I place this under a button on the same window.
event.source.parent.getComponent(“txtTranxferID”).requestFocusInWindow()
it works as expected. where did I go wrong?
Window objects don’t have named components, so they don’t take strings in their getComponent() methods. What they do have is a rootContainer property. Try this:event.source.rootContainer.getComponent("txtTranxferID").requestFocusInWindow()I’m still not sure it’ll work, though – I don’t remember if components are sufficiently initialized at the window open event to successfully claim focus.