Join The Works program to have access to the most current content, and to be able to ask questions and get answers from Revelation staff and the Revelation community

At 07 NOV 2019 12:22:00PM Brad Haughn wrote:

For some of our application we create the menu on the fly from multiple MDI frames and load it into another and then keep track of the events we want to fire separately.

When we go to fire those events, everything is fine except if we run a scripted menu event that returns 1 at the end of it. When it does, we get stuck in an infinite loop where whatever script is launched in the scripted event is fired over and over. So if it is a screen launched as a dialog box, when you close the dialog it re-runs the script and brings it back up again.

This is a snippet of the code running:

event = "MENU*2*":@APPID<1>:"*MENU*":Name MenuControl2 = MenuControl MenuControl2 = FIELDSTORE(MenuControl2, ".", 1, 1, UserMDIFrame) Call run_Event( @APPID<1>:"*OIWIN", MenuControl2, "MENU", event)

Once we hit the run_event, the code never returns to this procedure but the script called with run event continues to fire indefinitely. If I change the script that I call with run_event to return a 0, everything runs fine.

Any ideas?


At 12 NOV 2019 05:31AM Carl Pates wrote:

Brad - where are you calling RUN_EVENT this from? RUN_EVENT is more of a low-level "internal" function (i.e. not officially documented), so there may be caveats on how it can be used.

Carl Pates


At 12 NOV 2019 12:23PM Brad Haughn wrote:

We are calling run_event in a promoted menu event. We load our menu from multiple MDI frames but do not ever display them. So we are trying to launch an event for a screen we never want to display.

Is there a different way we can load and launch events for screens we are not displaying?

View this thread on the Works forum...

  • third_party_content/community/commentary/forums_works/b7890eddda73d54badefce864e0929c9.txt
  • Last modified: 2023/12/30 11:57
  • by 127.0.0.1