Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Accessing methods with SETALL type functionality
Message
From
11/06/1999 13:05:10
 
 
To
11/06/1999 12:13:29
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00228840
Message ID:
00228869
Views:
22
How about:
FOR EACH oControl IN THISFORM.Controls
   oControl.Init()
ENDFOR
You will need to do a refresh before. I would also put the line of code in a different method also, the Init() method is not supposed to be called more than once in the object lifespan.

HTH

>I've created a few controls in my forms library , combobox, spinner, editbox, textbox which I have added the property INITIALVALUE and a Method CHANGED.
>
>In the Init of the control I placed the line:
>
>this.initialvalue=this.value
>
>In the Changed method I placed the line:
>
>return (this.initalvalue<>this.value)
>
>
>This allows me to evaluate whether or not a control has changed easily, without data access. My problem is, if the control is not bound to a control source, and I revert/cancel operation, the tablerevert handles the data end fine, but the controls not bound to any data are left in their changed state. Now, when I check the changed() method, it reports back TRUE, because the Init method is not evaluated again. Is there an easier method to check if any given controls state has changed since initialization without going to the extremes I have? If not, is there an easy way to globally set all my initialvalue properties = the value property?
>
>The Setall() method works great for properties, but I need a way to invoke any predefined method in the same manner. Such as:
>
>Setall('Initialvalue',this.value,cClass)
>
>Of course this doesn't work since this.value will report back the current objects value if available, ....... any Ideas?
Previous
Reply
Map
View

Click here to load this message in the networking platform