Hello! I need to do this:
I have one frameset with 3 frames. And I need to open my views in one of this frames.
I need to use action buttons (on view action bar) to open views.
As i found in this forum, there is BIG problem to opening views in the same window. In my case - in the same frame!!!
The LS method uidb.OpenView("ViewFrame") don't work in this case! A LS error occurs: "unabled to use this method in this context".
So i tried to use Formula language:
1. I'v created agent
Triger: OnEvent (AgentListSelection)
Target: None.
Code:
@SetTargetFrame("ViewFrame")
@Command([OpenView]; "MyView")
2. For run agent i use action button with LS code.
Set db = ls.CurrentDatabase
Set agent = db.GetAgent("(OpenView)")
Call agent.Run()
And again the same error occur: "@Function is not valid in this context"!!! @SetTargetFrame() and @Command([OpenView]) don't work in agent.
I tried to place the same code in view action button:
@SetTargetFrame("ViewFrame")
@Command([OpenView]; "MyView")
In this case this commands work! And view "MyView" opens in frame "ViewFrame"!!!
Of couse i could stop on it. But i need more LS code in action button!!! So i need to do that just using LS or agent!
沒有留言:
張貼留言