Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Refreshing Object
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 9
Divers
Thread ID:
01037726
Message ID:
01037743
Vues:
13
Very clear Craig
Is what I'm trying to do :-)
Thank you

>The problem with putting the code in each object's refresh method is that they will get called whenever the refresh event happens for the parent object... form, container, whatever. This may or may not be what you need with your objects... so if all your shapes are based on the same superclass (subclass of vfp shape baseclass), it would be easy to create a method called updateshape for that superclass... then each of the shapes (subclass instances of the superclass you just created) would have that method in them. Or, better yet... you could create a manager class (custom) that would handle updating all the shapes on the form based on whatever logic you are using to change their backcolors or whatever... this manager class would understand the rules and update each shape accordingly.
>
>This more object oriented design would give you much more control and flexibility. The shapes would only get updated when you wanted them to be updated. And, should you still want them to all refresh when the parent container refreshes, you can still do that by putting a single line of code in the refresh event of the form/contaier or whater... such as this.shpmanager.updateshapes()
>
>I hope I've made sense... I tried to be clear and not make it seem too complicated, on the contrary the design is rather simple and will give you scalability and maintainability no matter what it is you are doing with these shapes.
>
>>Yes, it works quite fine.
>>I put the code in the refresh method elsewhere and call it programmaticaly.
>>
>>Thanks for your kindness
>>Alessio
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform