Loading and Using wc_Register% (AREV Specific)
At 12 SEP 2001 11:22:57AM Scott Kapaona wrote:
Hello,
Could someone give an example of how to use this common variable,and under what circumstance should it be used.
Thank You!
Scott K.
At 12 SEP 2001 05:20PM Curt Putnam wrote:
The registers give you persistent values as things move from prompt to prompt. I often open files to a register value. Example:
Equ FileName$ to Wc_Register%( 1 )
If Filename$ Else
Open Filename to Wc_Register%( 1 ) Else .....End
At 13 SEP 2001 10:19AM Michael Slack wrote:
I've used the register to hold different values that a set of programs may need to access. In that case I used the register as an array. I had a very involed multi-page window that required several programs to work with the different prompts. Because the progams were working with the same window (just different parts) and with the same record it was a real help to have some of the data easily accessable by all of the programs.
I've also loaded up one of those array elements with data that the user may need for a popup. The popup I did was so that I would only have to collect the data once, the popup itself could be called from several places so it help saved codeing and processing time.
I tend to think of the window register variable as a window based common variable.
I hope this helps.
Michael Slack
At 13 SEP 2001 12:38PM Don Miller - C3 Inc. wrote:
It's also useful as a scratch pad since each new window instance initializes its own block. If you need a global capability (across windows), you can use @USER vars or labelled common. The Window Common registers are kind of like local common blocks but they don't need to be initialized outside of a window.
Another use is to keep file handles there if you need to swap dicts around between windows and collectors which might need to use dictionary calls (F2 things, mostly).
It's a very useful feature
Don Miller