Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Vartype() type works different for hyperlink?
Message
De
13/07/2003 14:18:18
 
 
À
07/07/2003 15:53:47
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Divers
Thread ID:
00807623
Message ID:
00809675
Vues:
15
Hi Bill,

this is a bug on VARTYPE() function.

For Hyperlink: Left,Top,Height and Width are Hidden.

Hyperlink have another bug for Height and Width:
these can be seen on "Edit Property/Method", but not in "Properties".
VARTYPE() not resolve HIDDEN or PROTECTED property or methods.
This bug occur on other command, when this internal C++ sequence is call:

- properties exists ? yes
- properties is accessible ? this test is non done
Probably VFP Team they are forgets to insert the C++ call for access test
- properties is use ? Property "name" is not found (Error 1734)

Example:
_SCREEN.CLS
cibo=CREATEOBJECT("Peperone")
? PEMSTATUS(CIBO,"Left",1), PEMSTATUS(CIBO,"Left",2), PEMSTATUS(CIBO,"Left",5)

cibo.ADDPROPERTY('Left',99)	&& ERROR 1734
ADDPROPERTY(cibo,'Left',99)	&& ERROR 1734
? cibo.LEFT			&& ERROR 1734
? VARTYPE(cibo.LEFT)		&& ERROR 1734
? VARTYPE(cibo.Colore[2])	&& ERROR 1734
? VARTYPE(cibo.MyRef2(2))	&& ERROR 1734

? VARTYPE(cibo.taglia)		&& OK
? VARTYPE(cibo.tessuto)		&& OK
? VARTYPE(cibo.MyRef(1))	&& OK
? TYPE('cibo.LEFT')			&& OK
? VARTYPE(cibo.Larghezza[2])&& OK

DEFINE CLASS Peperone AS Hyperlink
	
	taglia = 'large'
	
	DIMENSION Colore[4]
	Colore[1]='Giallo'
	PROTECTED Colore
		
	PROCEDURE MyRef(z)
		? 'call ',z && non viene chiamata da TYPE('MyProc()')
		RETURN 'ZUPPA'
	ENDPROC

	PROTECTED PROCEDURE MyRef2(z)
		? 'call2 ',z && non viene chiamata da TYPE('MyProc()')
		RETURN 'ZUPPA2'
	ENDPROC

ENDDEFINE
Fabio
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform