Perspective Request Focus in Window

As @grietveld said previously, all Perspective scripts execute on the Gateway, so be aware that any scripting you’re doing in Perspective will execute in the Gateway scope - even if the method has multiple scopes available to it.

With that being said, Perspective uses Views/Pages, not Windows (these are a Vision concept), so the requestFocusInWindow() method is of no use to you here.

What you could do is directly address the component you’d like to put focus onto and apply focus to it:

From another component:

self.getSibling('TextField').focus()

From the root container:

self.view.rootContainer.getChild('TextField').focus()
3 Likes