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 14 JUN 2002 10:21:00AM David Kafka wrote:

My understanding is that the @ variables have a system-wide scope. Is this true? And assuming so, what are the implications for programming technique?

For example, suppose I have multiple instances of the same form visible, or even different forms visible, simultaneously. If these forms resolve {} symbolics, they must need to work with the @ variables. What prevents the multiple windows from stepping on the values used by each form?

Suppose I am using a commuter subroutine (procedure) with a form, and in that routine I open @DICT, and set @ID and @RECORD. Suppose, for the sake of argument, I have a similar scenario with a different form, and both forms are open at the same time.

1. While the procedure for Form A is actually running, is there any chance that the values of the @Variables can be stepped on by my attempting to work with Form B?

2. Suppose the Form A's procedure stops at a non-modal MSG call, and I am meanwhile working with Form B. Might the values of @RECORD etal in Form A's procedure be stepped on by the work I am doing Form B?

3. Might the answers to any of these questions be affected in the future by a hypothetical multi-threading OI?

4. Does anyone have any general guidelines for dealing with these issues?

Thanks,

David


At 14 JUN 2002 01:14PM Richard Hunt wrote:

David,

When working with the system variables @DICT, @ID, @RECORD, etc; they are unique for each window form. So, form A system variables @DICT, @ID, @RECORD, etc; have no effect on form B.

Now, when you modify these variables, I would strongly suggest that you save the values, use them, then restore the values back, just to be safe. Kinda like this…

HOLD_DICT=@DICT

HOLD_RECORD=@RECORD

HOLD_ID=@ID

Do some stuff…

@DICT=HOLD_DICT

@RECORD=HOLD_RECORD

@ID=HOLD_ID

One last thing David… Get a second opinon on this. I have done this many times and had no bad effects. I do know that OpenInsight does use these variables and that the information stored in these variables by OpenInsight is not too reliable.


At 15 JUN 2002 12:26PM [url=http://www.sprezzatura.com]The Sprezzatura Group[/url] wrote:

We've found these variables to much more reliable than in the old 2.0 days. When the system starts the event logic chains, it does a good job of setting the variables back. Doing a push and pop select before calling some modal windows might not be bad idea to be safe. For the most part, moving through windows uses similar logic as moving through TCL levels. All the code surounding event chain calls makes pulls the information from the window before passing control onto your program.

The Sprezzatura Group

World Leaders in all things RevSoft

View this thread on the forum...

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