Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Retaining the setting
Message
From
19/07/2007 19:11:35
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Retaining the setting
Miscellaneous
Thread ID:
01242201
Message ID:
01242201
Views:
50
I have a form inside an application. In the Init of the form is
this.AddProperty('omySQLData',CREATEOBJECT('app_data_env_mySQL'))
Define Class App_Data_Env_mySQL As Custom

	Dimension aUPDFieldNames[1]
	Dimension aUPDFieldValues[1]

	cTableName = Space(0)
	cUPDCondition = Space(0)
	cTableOperation = Space(0)
	IsTest = VARTYPE(rlpIstest)="L" AND rlpIsTest 
	ofrmBase = .Null.

**--------------------------------------------------------------------
	Hidden Function Init() HelpString 'Does when the object is created'

		This.ofrmBase = Createobject('frmBase')
                etc.
		Return .T.

	Endfunc
rlpIstest is public variable set in my test version of the calling program.

I set the conditions such that rlpIstest is (say) true on the first iteration. I close the form and exit the application. I then change the conditions so rlpIstest should be false. When this class is re-instantiated the IsTest value is the same as in the first instance.

In the Unload event of the form I have added
thisform.oMySqlData = .NULL.
but that doesn't seem to have helped. I resolved this issue by putting
this.IsTest = VARTYPE(rlpIstest)="L" AND rlpIsTest
in the init method of the class but I'm curious as to why it retains the original value the second time it is instantiated.

Any insight appreciated..............Rich
Next
Reply
Map
View

Click here to load this message in the networking platform