Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Nobody uses control arrays???
Message
 
To
15/11/1996 11:57:32
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00012312
Message ID:
00012403
Views:
39
>Yes, it will, but as I mentioned earlier, it would be only a property
>array, not a control array. You can create a whole forest of trees and
>trees of property and custom property arrays, and create objects from
>them, but it cannot be called a process of creating control arrays.
>
>>How this enhances polymorphism is not clear to me either.
>
>Simple. Suppose you have 10 entry fields on your form. In your program
>logic you want to ensure that none of the fields are left blank on exit
>from the form, and yet can be freely navigated while the form is active.
>I KNOW how to do it with custom classes and custom methods that I would
>and HAVE created for the form to replicate the functionality. But imagine
>now you have a control array containing all 10 entry fields. All you are
>left to do is to create ONE (UNO/Ogun) Valid method and run a FOR loop
>containing 4 lines of code on all 10 fields, - and you're done!!! No Rocket Science involved, maintenance is a breeze, and you are home free!

vfp gives you this array (i can't remember the name -- i'll look it up later if no one else responds). we use this array in the manner you're suggesting. with properties added to textboxes, we determine which fields require data entry. when attempting to save info and exit the form, we call one method which reads through this array and generates a list of data items that require entry but were left blank. if any meet this requirement, this info is stored in an array in this method. the user can only exit and save when this array is empty.


>THAT'S WHAT I AM AFTER! In C++/VB/Visual dBase I can do it with my eyes
>closed, and in VB/VDB I can also create all those things by dragging and
>dropping. What about VFP?
>>
>[code was removed to save space]
>
>Regards
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform