Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Cannot access object
Message
De
28/12/2018 07:43:19
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Titre:
Cannot access object
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows 10
Divers
Thread ID:
01664905
Message ID:
01664905
Vues:
95
This is new to me.

I have a Tooltip class called Balloon in Balloon.vcx (home-grown, all VFP code). I add it to a form, and name it Balloon. In control's MouseEnter, I call a method in the Balloon object called Open to display the Tooltip.

Some of the forms in my project perform as expected, but many others throw an error "Unknown member Balloon." I then suspend the execution, and open the debugger. Looked at the form object to see if the Balloon object is there and named correctly. Yes, it there, and shows in the Local window as an object, but it does not have the little [+] in front of the member reference. I open the Watch window, and enter a direct reference to the Balloon object. Ok, that has the [+]. Click on the [+] to expand the properties, an low-and-behold all the properties are there. But all of them have "Expression could not be evaluated." next to them.

As I said, this does not occur in all the forms inherited from base class, only a few.
The Balloon class is based on a Timer class to provide a delay before displaying the tool tip.
I have try removing from the base class and placing it directly on the Form itself. Same error on the same forms, and works in the forms it work before.

Does anyone have any idea why the object is not accessible in some places and not in others?

UPDATE: My Bad. The instantiation of the Balloon object was failing, but not reporting the failure. Because the class was visually placed on the form, the reference to the class existed, but not the actual object.
Greg Reichert
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform