My command usage is similar to this:
Code: Select all
DCVARGROUP TO oV NAME mVars ;
m_tran_ref := SPACE(10), ;
m_tran_date := CTOD(''), ;
m_tran_amt := 0, ;
m_tran_type := SPACE(1), ;
m_tran_desc := SPACE(35), ;
m_ccompany := SPACE(60), ;
m_cadd1 := SPACE(25), ;
m_cadd2 := SPACE(25), ;
m_cadd3 := SPACE(39), ;
m_caccount := SPACE(10), ;
m_cssn1 := SPACE(9), ;
m_cssn2 := SPACE(9), ;
m_cphone := SPACE(10), ;
m_cstate := SPACE(2), ;
m_dduedilig := CTOD(''), ;
m_dunclaimed := CTOD(''), ;
m_lduedilprt := .F., ;
;
d_lEditmode := .F., ; // Define for TOOL BAR - in edit mode or not
d_lAddmode := .F., ; // in add mode
d_nTabpage := 0, ; // current tab page number
d_bNextpage := NIL, ; // code block for next page hot key +
d_bPrevpage := NIL, ; // code block for next page hot key -
d_cTitle := '', ; // program dialog title
d_lDisablesave := .F., ; // flag to disable save button
;
d_oDialog := NIL, ; // pointer to option dialog screen
;
d_oMsgbox := NIL, ;
d_oStatstatic := NIL, ;
d_oStatbar := NIL, ;
;
d_nSaverecord := NIL, ; // work variable used for current record position
d_aNtabs := NIL, ; // array containing tab page ordinal number
d_aOtabs := NIL, ; // array containing tab page object pointers
I have been using mVars as the NAME in all programs. I just noticed that if I open up two separate dialogs, each in its own thread, that they appear to be colliding. The help file discussion regarding DCVARGROUP is not really documented and the sample file is limited. It would appear that if I use the same NAME in each program, for example I had been using mVars, that this is causing the variables to collide. oV is defined as a LOCAL variable in each dialog.
What is the proper usage of the NAME component and what does it do?
Do I need to be passing the oV local variable between functions?
If I am using a separate local variable, oV, in each thread, is that not keeping them separate or does the NAME used have some effect.
Cliff.