Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Form array property vs many properties?
Message
From
01/02/2008 13:47:46
 
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 9 SP1
Miscellaneous
Thread ID:
01288030
Message ID:
01288232
Views:
13
>>>>I need to load a bunch of data (from a table) into a form INIT method (total number of values is no more than 10). I am considering loading this data into an array property of the form. Or add each data value as a property of the form (using thisform.addproperty(...))
>>>>
>>>>Which approach is better in terms of memory use? I think speed-wise (because VFP is so fast) it be much different. Any other things I need to take into consideration?
>>>>
>>>
>>>I doubt if it makes a difference in memory. Unless the data is really array-like, that is, a variety of values for a single entity, I vote for separate properties. The ability to give meaningful names has a lot of value.
>>
>>Bingo. You beat me to it. Code such as aMyArray[11] is asking for trouble.
>
>I chose Sergey's suggestion; nothing wrong with what Tamar suggested though.

Somehow I missed in my initial reading that all the items were from a single table. In that case, I agree with Sergey that SCATTER NAME is a very good choice.

Tamar
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform