Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Retaining the setting
Message
De
19/07/2007 19:11:35
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Retaining the setting
Divers
Thread ID:
01242201
Message ID:
01242201
Vues:
51
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
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform