Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Access Method
Message
 
 
À
21/12/2019 09:42:29
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Titre:
Divers
Thread ID:
01672305
Message ID:
01672374
Vues:
66
>>>>
>>>>In order for Thomas' approach with Access to work, I would need to have the textbox base class created in code. Since in my case the base class is created visually, I can't figure out (without hacking the vcx file) how to set a property of a base class to the value in the oApp class. Here is more details:
>>>>My textbox base class (in my application) has a property .BACK_COLOR_FOCUS (current has a value hard-coded). This property would have to be set to the value oApp.BACK_COLOR_FOCUS (Access method of the oApp class). But I cannot set it in the visual class. In a PRG class that would work.
>>>
>>>I don't see any reason why this shouldn't work with a visual class. I haven't studied Thomas' solution, but please explain what's the specific problem you mention.
>>
>>Here is an example I tried (that did't work).
>>I created a method TEXT_BACK_COLOR_FOCUS_ACCESS() in the oApp class.
>>Then in the base textbox class (in the visual designer) I set the value of a property BACK_COLOR_FOCUS to oApp.TEST_BACK_COLOR_FOCUS
>>But at run-time the method TEXT_BACK_COLOR_FOCUS_ACCESS() never fires.
>>Let me know what you see I am doing wrong.
>
>If you create an access method, there must be a matching property. IOW create the property TEXT_BACK_COLOR_FOCUS and check the box Access Method before you press Add. Now you will see this access method listed in the editor. And whenever your code checks for the value of this property, its _access method will fire.

Now I need to figure out how to create a PROPERTY in the PRG class and check the box Access method.
But I see now that I was missing a couple of points. Thank you.
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform