Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Bug, Vartype error with hidden and protected properties
Message
 
To
23/11/2004 11:22:39
General information
Forum:
Visual FoxPro
Category:
Visual FoxPro Beta
Environment versions
Visual FoxPro:
VFP 9
Miscellaneous
Thread ID:
00963870
Message ID:
00963906
Views:
8
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform