Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Bug, Vartype error with hidden and protected properties
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Visual FoxPro Beta
Versions des environnements
Visual FoxPro:
VFP 9
Divers
Thread ID:
00963870
Message ID:
00963906
Vues:
7
Hi Fabio,

I don't see why is it bug...
WITH CREATEOBJECT('aaax')
   ?"Object:"
   ?"hidden", VARTYPE(.hprop)
   ?"protected", VARTYPE(.pprop)
   ?"normal", VARTYPE(.prop)
   ?"unknown", VARTYPE(.propx)
   ?
   .Test()
   ?
   .Test2()
ENDWITH 

DEFINE CLASS aaa as Custom
HIDDEN hprop
PROTECTED pprop 
hprop = .T.
pprop = .T.
prop = .T.
 procedure test()
   ?"First class:"
   ?"hidden", VARTYPE(.hprop)
   ?"protected", VARTYPE(.pprop)
   ?"normal", VARTYPE(.prop)
   ?"unknown", VARTYPE(.propx)
 endproc

ENDDEFINE


DEFINE CLASS aaax as aaa
 procedure test2()
   ?"Derived class:"
   ?"hidden", VARTYPE(.hprop)
   ?"protected", VARTYPE(.pprop)
   ?"normal", VARTYPE(.prop)
   ?"unknown", VARTYPE(.propx)
 endproc

ENDDEFINE
- Object cannot r/w hidden/protected properties and call hidden/protected methods
- Derived class cannot r/w hidden properties and call hidden methods from class hierarchy

Try this:
?VARTYPE(_screen.ActiveControl)
Is bug or no?

MartinJ

>Previous issue Thread #963790
>
>Bug/Issue : 14 of 35
>
>TITLE: Bug, Vartype fire a error with hidden and protected properties
>
>VERSION: 09.00.0000.1720 and VFP8SP1
>
>EXPECTED:
>VARTYPE() return "U" when a property it is not readable.
>
>OBSERVED:
>VARTYPE() Vartype fire a error with hidden and protected properties.
>with the second parameter declared the thread #956559 bug appear also.
>
>
>WITH CREATEOBJECT('aaa')
>? VARTYPE(.hprop)
>? VARTYPE(.pprop)
>? VARTYPE(.prop)
>? VARTYPE(.propx)
>ENDWITH
>
>DEFINE CLASS aaa as Custom
>	HIDDEN hprop
>	PROTECTED pprop
>	hprop = .T.
>	pprop = .T.
>	prop = .T.
>ENDDEFINE
>
>
>Fabio
"Navision is evil that needs to be erazed... to the ground"

Jabber: gorila@dione.zcu.cz
Jabber? Jabbim
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform