Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Generic object property reference
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
01013029
Message ID:
01013033
Vues:
13
See AMEMEBERS() function.

>there are commands in vfp for refering to the fields in a table, generically.
>
>2 would be fields(),fcount().
>
>i guess i am trying to find similar commands for an object.
>
>thru perversity rather than need, i am attempting to store a small table as an object and then use this in code in lieu of scanning thru the table looking things up.
>
>i can manage to find some of what i want with the amembers command and stick the properties in an array and use it to 'feed' my code, but geez, its seems like there would be something more specific.
>
>can someone suggest how i can take an object that would look like the following
>
> rates (ojbect)
> ambulatory wheelchair buspass (object)
> description description description (property)
> billcode billcode billcode
> billamount billamount billamount
> company company company
>
>this is analagous to a table called rates, with rows of ambulatory, wheelchair, buspass, and fields of description, billcode,billamount, company
>
>in table code i would
>use rates
>scan
>do case
> case 'AM' $ description && dont NEED to know this is wheelchair or buspas
> ** execute the billcode
>endcase
>endscan
>
>this works fine if i even add MORE rows, or have only 1.
>
>
>
>how can i 'scan' the rates object to do the same?
>
>i cant figure how to conquer pointing to the 'general' obj/obj/property
>
>for beginObjectPropertyList to endObjectPropertyList
>do case
> case 'AM' $ rates.xxxxx.description
>endcase
>endfor
>
>as i dont know how to refer to the .xxxxx.
>
>thats my problem.
>
>thanks.
>
>jim@sturtzs.com
--sb--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform