Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
ISSUE: sys(1272) and form name
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Titre:
ISSUE: sys(1272) and form name
Versions des environnements
Visual FoxPro:
VFP 9
Divers
Thread ID:
01035046
Message ID:
01035046
Vues:
79
SYS(1272) doesn't return the path string that describes the absolute position of an object,
but simply it replaces ThisForm.ObjectPathInForm with (thiform.Name).ObjectPathInForm .
Then it is only usable in the case that a form has 1 alone instance,
and it is anchored to a variable with his same name.

Ok,the program in C++ comes easy easy,
but it is practically useless.
PUBLIC mypathname

mypathname=CREATEOBJECT("mypathname")
mypathname.Name = "anothername"
mypathname.Show(1)
RELEASE someName

DEFINE CLASS mypathname AS form
	Name = "mypathname"


	ADD OBJECT command1 AS commandbutton WITH ;
		Top = 44, ;
		Left = 170, ;
		Height = 27, ;
		Width = 84, ;
		Caption = "Command1", ;
		Name = "Command1"

	PROCEDURE command1.Click
		* when eval("thisform.name") # thisform
		* expected Hierarchy is _SCREEN.forms[currentFormindex]..... or empty
		MESSAGEBOX(SYS(1272,m.this),0,"Object Hierarchy")
		MESSAGEBOX(TYPE(SYS(1272,m.this)),0,"return datatype")
	ENDPROC

ENDDEFINE
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform