Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Issue: AINSTANCE()
Message
De
06/02/2005 07:45:52
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Programmation Orientée Object
Titre:
Issue: AINSTANCE()
Versions des environnements
Visual FoxPro:
VFP 9
Divers
Thread ID:
00984294
Message ID:
00984294
Vues:
61
VFP Help:
"Only class instances assigned to variables and array elements
with CREATEOBJECT( ) or NEWOBJECT( ) are placed into the array. "

Result: AINSTANCE is pratically useless.
CLEAR
CLEAR ALL
goINSTANCE1 = CREATEOBJECT('Form')
ADDPROPERTY(_SCREEN,"INSTANCE2",CREATEOBJECT('Form')) && HIDDEN
WITH  CREATEOBJECT('Form')	&& HIDDEN
	FOR K=1 TO AINSTANCE(gaMyArray, 'Form')
		? gaMyArray[m.k]
	NEXT
        RELEASE gaMyArray
ENDWITH
REMOVEPROPERTY(_SCREEN,"INSTANCE2")
Then:
AINSTANCE(ArrayName, cClassName, [allInstance])
* fill ArrayName with all object values for the cClassName
it is very usefull.

Others very usefull are:
AREFERENCE(ArrayName, object )
* Return all variable names (m.XXXX) or the property (path\property)
* that reference to an object.
* then EVAL(ArrayName[k]) is the object reference to object.

WITHSTACK(widthLevel) and WITHSTACKLEVEL()
* return the current WITH stack status
* WITHSTACK(N) for N>WITHSTACKLEVEL() return a NULL object
* WITHSTACK() return the current with value
Fabio
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform