Sign up on the Revelation Software website to have access to the most current content, and to be able to ask questions and get answers from the Revelation community

At 23 JUN 2003 03:42:29PM Jim Eagan wrote:

I give up. This should be simple - it would be 20 minutes in Arev. I've put 100+ manhours into it in OI and it still does not work. Situation (I'll explain in Arev terms - easier to understand) :

Subroutine Key_Control (nada)

 Call Catalyst('W','CTRL_WIN')
 Rec_Key=@pseudo:'*':some_stuff (this is simplified)
 Call Catalyst('W','A_WINDOW ':Rec_Key) (edits in window)
  do various...
 Call Catalyst('W','Z_WINDOW ':Rec_Key) (more edits)
  do other stuff

I've tried Dialog_box, Start_window etc - can't get 100% of what I need (and had before). I've tried so many variations and gotten so many different failures that it is difficult to list them all.

Help PLEASE!


At 23 JUN 2003 04:01PM Richard Hunt wrote:

Jim,

I am guessing that you are trying to pass some parameters to the newly opened window. If that is true then you could do this…

Using a dialog box… the "initparam" (arg 3) can be used to pass arguments.

Using "START_WINDOW" … the "createparam" (arg 3) can be used to pass arguments.

Then using the "CREATE" event "createparam" (arg 3) of the newly opened window, you can finish using the passed arguments and put them where you want.


At 23 JUN 2003 04:03PM Donald Bakke wrote:

Jim,

After reviewing your AREV pseudo-code I'm still not sure what you can't do in OpenInsight. It seems like you are trying to do one general and one specific thing: launch windows in general and launch windows with a Key ID so that a record will automatically load. Is that what you are trying to do?

In the general case you should be able to use Start_Window or Dialog_Box without any problems. If you want to start a window and automatically load the Key ID then you have to write some code to do this. Here are the general steps:

1. Use Start_Window or Dialog_Box as normal but pass the Key ID through the CreateParam parameter.

2. In the CREATE event of your window, look to see if the CreateParam parameter has anything in it. This will be your Key ID.

3. If you have a Key ID then set the TEXT property(ies) of your key control(s) with the Key ID value.

4. Send a READ event to @Window (i.e. Send_Event(@Window, "READ")).

We automate this through the use of a promoted CREATE event. That way we don't have to write the logic over and over again for every window in our application.

Let me know if this is what you were looking for or if I completely misunderstood your question.

dbakke@srpcs.com

SRP Computer Solutions, Inc.


At 23 JUN 2003 08:23PM Jim Eagan wrote:

Don and Richard

Thank you but 'been there done that'. I would not have posted this otherwise.  I'll try to post something more clear as soon as I can.

At 24 JUN 2003 03:08AM Oystein Reigem wrote:

Jim,

You haven't told if Don is right in his assumptions about what you try to do. (Having forgotten all I once knew about Arev I haven't got a clue myself.) If he is correct somebody can post you a simple working example. Just tell if it should be quickevents or user events.

- Oystein -


At 24 JUN 2003 10:49AM Jim Eagan wrote:

Not exactly but frustration was runnibg amuck causing my description

of what I sought to be ANYTHING but clear - sorry about that. What I really was looking for was how to control the process. To digress, in the old days it was a simple linear process:

call Catalyst; window runs; window closes; control returns to your code; you do some processing and then another Catalyst cycle etc…

I have it working in OI with a perhaps odd blend i.e.

non-data-bound window runs; calls program; program does Dialog_box; then some code; then does Start_MDIChild and returns to first window IT WORKS.

Thank you all for your assistance


At 24 JUN 2003 12:33PM Donald Bakke wrote:

Jim,

If you now have it working then great. For the benefit of others, and perhaps yourself, perhaps some explanation of a difference between the way AREV and OI (i.e. Windows) works would be helpful.

As you surmised, virtually everything in AREV works in a linear process (background processing being one exception). Suffice to say, however, that when a window is called via code it will persist until closed and then the rest of the code can proceed.

By default, OpenInsight/Windows runs windows in a "multi-tasking" paradigm. That is, when a window is launched it does not automatically suspend the execution of the code that launched it until it is closed. They are running somewhat in parallel. This is why we can run multiple windows in OI (or virtually any Windows application) and switch between them. In AREV, we can launch multiple windows on top of one another be we have to close the top one before returning to the one underneath it.

To simulate the control you are describing a window must be launched in "modal" mode. Modal means everything is suspended until the window that is running is closed. The Dialog_Box function does this for you. Alternatively, you can create your own modal functionality using the MODAL property.

dbakke@srpcs.com

SRP Computer Solutions, Inc.


At 26 JUN 2003 08:29PM Barry Stevens wrote:

]]Start_MDIChild and returns to first window «

If you only want the return back to further code execution to occur after the MDI child window has been closed, you will need to do a yield loop to see if the window is still open by getting the Handle when launched then check to see if Window Handle is still running.

If you want I will find a SSP when I have done this and publish the code.

Barry


At 27 JUN 2003 05:19AM Oystein Reigem wrote:

Jim,

I don't know exactly what it is you want to do. But here are a couple of comments about control. Say you want a main window (e.g an MDI frame) run two other windows A and B (e.g MDI child windows) in sequence. We probably agree the main window should be in control. Code on the main window starts window A. If there is a problem with the code not waiting for a A to finish, then break it up: Let the code start A and nothing more. Window A runs, and when it's finished it sends or posts a message to the main window telling it so (e.g 'OMNIEVENT', 'A_IS_FINISHED'). The main window (with an OMNIEVENT A_IS_FINISHED handler) then runs another piece of code that starts B.

- Oystein -

View this thread on the forum...

  • third_party_content/community/commentary/forums_nonworks/e8479c2887fe595985256d4e006c42d2.txt
  • Last modified: 2023/12/28 07:40
  • by 127.0.0.1