Help re: flushevents, system window and kill
eptya at bigpond.com
Sun Mar 26 12:02:36 CST 2006
I am fairly new to revolution and need some help to ensure an application loaded via the shell is always the top window, even if the user clicks on another window. I have searched the list and looked through the rev docs but can't find a solution which will work on all platforms.
The specific issue is....
I have an application which acts as a main menu (containing buttons) to load other applications I have made with rev. When I click on a button an application is loaded via the shell function and the do command. Howver, the application that is being loaded takes a couple of seconds to load. If I click on the main menu window (application) while the other application is loading the new application window will load behind the menu. The menu and the other applications do not have a title bar or controls.
Is there a way to work around this?
I have tried putting flushevents("mousedown") as well as mouseup, system and activate in the handler. I have also tried to set the menu's systemwindow property to false if the user clicks on it while a linked application is loading. I tried to set the linked application's systemwindow to true once it is loaded - the application comes to the front for a split second then disappears behind the menu. I have tried to use the click command to activate the new application as soon as it is loaded. Last, I have tried to use the kill command (when the menu is closed) to close the applications I know may have been loaded but are sitting behind the menu's window. Can the kill command really close an application if the process image name is known? I have tried to use all of the above with the launch command as well.
Any help would be greatly appreciated.
More information about the use-livecode