Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to define a collection within a custom class?
Message
De
24/04/2001 16:38:26
Larry Long
ProgRes (Programming Resources)
Georgie, États-Unis
 
 
À
24/04/2001 11:22:55
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
Information générale
Forum:
Visual FoxPro
Catégorie:
Programmation Orientée Object
Divers
Thread ID:
00499048
Message ID:
00499286
Vues:
19
Cool! Many thanks!!
//:^)


>>How do I go about adding a collection to a custom class's definition?
>>
>>What a want is something like...
>>
>>DEFINE CLASS ViewInfo AS Custom
>>Name=''
>>ADD Object FieldInfo AS Collection
>>FieldInfo.FieldName=''
>>FieldInfo.FieldCaption=''
>>FieldInfo.Updatable=.f.
>>ENDCLASS
>>
>>Where I can declare multiple instances of the FieldInfo Object containing info for each field in the view, etc...
>>
>>Any ideas?
>>
>>TIA,
>>Larry
>
>Larry,
>Could it be an array ? If so :
>
>
define class ViewInfo as Relation
>dimension FieldInfo[1]
> procedure ClearInfo
> dimension this.FieldInfo[1]
> this.FieldInfo =.F.
>endproc
> procedure FillInfo
> lparameters tcAlias
> select (tcAlias)
> dimension this.FieldInfo[reccount()]
> scan
>  scatter name this.FieldInfo[recno()]
> endscan
>Endproc
>enddefine
Cetin
L.A.Long
ProgRes
lalong1@charter.net
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform