>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