Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Refreshing picture on page or form
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00490766
Message ID:
00490795
Vues:
9
>I see your point, if you find something, let me know.
>
>João Batista

I think I have a relatively nice solution. There are two elements to it.

1. I created an equivalent to .SetAll() for my objects, called DoAll. This is a very generic technique for all sorts of things. What I do is to create (in all my base classes) a property called DoAll, with an assign method DoAll_assign. Here is what the assign method looks like:
LPARAMETERS pcMethod
*** pcMethod: Method name and arguments:
***           method (arg1 [,arg2]...)

LOCAL lcMethod
lcMethod = ALLTRIM(leftto(pcMethod, "("))
IF PEMSTATUS(this, lcMethod, 5)
	*** Method exists
	this.&pcMethod
endif
return
Now, if I want to execute method XXX with arguments (YYY,ZZZ) in all contained objects, I can do it with...
this.SetAll("DoAll", "XXX(YYY,ZZZ)")
2. The second step simply applies this technique. In my form object REFRESH method I simply added the line below. Work great!
this.SetAll("DoAll", "Refresh", "IMG")
(The 3rd argument limits it images based on my base class IMG.)

Hope you or others find this useful.

Tom
Tom Green in Montreal
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform