Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Refreshing picture on page or form
Message
 
To
01/04/2001 17:37:19
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00490766
Message ID:
00490795
Views:
10
>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
Previous
Reply
Map
View

Click here to load this message in the networking platform