Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Nobody uses control arrays???
Message
From
15/11/1996 11:57:32
 
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00012312
Message ID:
00012394
Views:
34
>>
>> It looks like nobody here uses control arrays
>> created interactively...Is this the case? I just
>> wonder because I surely can't even think about
>> avoiding having them even in the smallest application.
>> Would anyone challenge this assumption? :)
>
>Hi Robert,
>
>If you create a property in an object that is an array and 'addobject'
>to it,
>would you then not having a control array?

No, because it is not a control array, but property array, which usage
is described in VFP manuals pretty ellaborately. Of course, having an
array anywhere within the structure of an object enables you to create
PROGRAMMATICALLY, not INTERACTIVELY, any objects and add them to the
current container. But it does not equal to creating a control array!

>In the following example look at the Objs property. It keeps the
>pointers to each form that is created.
>
>What do you mean by using the control arrays interactively. You could
>use the same system in forms
>at design time, under class, create properties/methods, you _can_ create
>arrays as properties. Would that then be interactive?

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!
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
Some things are better be left unknown...NOT!!!
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform