Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Why does this not work?
Message
General information
Forum:
Visual FoxPro
Category:
Object Oriented Programming
Miscellaneous
Thread ID:
00571086
Message ID:
00571251
Views:
21
>>Does anyone know why COMPOBJ(xx, yy) does not work for the following (VFP7):
>>
>>xx=CreateObject('custom')
>>yy=CreateObject('custom')
>>? COMPOBJ(xx, yy) && should have returned .t. instead I get .f.
>>
>>Costas
>
>Because after instantiation they obviously have different Name properties.
>
>From Help:
>
>COMPOBJ( ) returns false (.F.) if an object has a property that the other object doesn't have, or if the objects have identical properties but the values of one or more properties differ.

I believe the problem lies with the fact that at least two of the properties are not even valid.

Try ? vartype(xx.controls) and varType(xx.objects). You get an error message. At least one should get a 'U' for undefined.

Sounds like there is a flaw in the 'custom' class. The properties: controls, objects and a few other visual/form related properties should not even be part of this class. This should ave been the base object class that all other classes inherit from. I hope this gets fixed or the very least initailize the Objects and Controls properties to something valid.


Costas
Previous
Reply
Map
View

Click here to load this message in the networking platform