Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Record Pointer Best Practice
Message
 
 
To
27/07/2001 11:42:08
Jay Johengen
Altamahaw-Ossipee, North Carolina, United States
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00536306
Message ID:
00536476
Views:
9
This message has been marked as a message which has helped to the initial question of the thread.
>>Second, I would create a 2-dimensional form-level array property to hold the view information. You could create a form-level method to retrieve the key value by passing in the view name.
>
>Such that it would look like the pseudo example below?
>
>
>aViewRecord(1,1) = 'View1'
>aViewRecord(1,2) = 'KeyField'
>aViewRecord(2,1) = 'View2'
>aViewRecord(2,2) = 'KeyField'
>
Something like that. Although I would put the Keyfield value in column 2. If you wanted to make it more generic, you could have a 3 column array with one of the columns holding the name of the Keyfield and one holding the actual current value.

>
>>Third and my recommended suggestion is to create a form level collection property. The basics of it are that VFP collection objects are wrappers to arrays. The functionality is already built into it to handle the stuff mentioned in the above paragraph. You can download a few examples from the Downloads section. There are also two articles in the May and June VFUG newsletters (sign-up is free to access newsletters).
>
>So, I would reference the wrapper and it would return the view information? Or did I simplify that too much?

A little oversimplification never hurt anyone. ;-) Methods of the Collection object would act on the array property of the collection and return information you needed. The general collection object discussed in the VFUG article could be augmented to better suit your view collection needs. FWIW, I use collection objects to handle Table, Record, Stored Procedure and Error objects (to name a few). Each collection class augments my base collection class with PEMs specific to the type of object that can reside in it.
Larry Miller
MCSD
LWMiller3@verizon.net

Accumulate learning by study, understand what you learn by questioning. -- Mingjiao
Previous
Reply
Map
View

Click here to load this message in the networking platform