Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How can I...
Message
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Titre:
Divers
Thread ID:
00065402
Message ID:
00065415
Vues:
34
Mark,

Are you trying to put these expressions in the Property Sheet of the class designer? If so it's not going to work the way you want. Those expressions are only evaluated the first time an instance of the subclass is created. All other objects created from the subclass will get the same value as the first instantiation. There is a whole section on this topic in my PTF OOP book.

You need to put this code probably in the subclass Refresh() method to make the object update at runtime as you are expecting it to.

>I have a check box subclass that has several properties based on the deleted() status of the current record in a table. I have added a property to the class, TableName, where I put the name of the table that the check box properties refer to. What I am trying to do in the properties sheet of the subclass is set forecolor, value and the caption using iif(). For example:
>   Caption = iif(deleted(This.TableName),"Deleted","Delete")
>   Value   = iif(deleted(This.TableName),1,0)
>How can I get deleted() to use the actual value of This.TableName? I have tried stuff like deleted(eval(This.Tablename)), but to no avail.
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform