Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
DEFINE CLASS with array property
Message
De
23/09/2003 05:50:19
 
 
À
23/09/2003 05:20:59
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Divers
Thread ID:
00831361
Message ID:
00831368
Vues:
14
>I know it must be simple but I can't sort it out.
>How does a DEFINE CLASS Statement looks like defining a property as one dim. array with an associated access method.
>
>DEFINE CLASS ...
>APROPERTY[1]=.f.
>PROCEDURE APROPPERTY_ACCESS
>lparameters m.nIndex1
>RETURN THIS.aproperty[m.nIndex1]
>ENDPROC
>ENDDEFINE
>
>does not work. "APROPERTY is not an array"
>
>I created a class with a property as array/access_method in the class designer and run the document wizard to create a source code listing: the procedure was there. I can find all other userdefined properties but no array definition at all.
>
>Giesbert

Giesbert,
DEFINE CLASS ...
dimension APROPERTY[ 123 ]

function APROPERTY_access
    lparameters m.nIndex1
    RETURN THIS.aproperty[m.nIndex1]
endfunc

enddefine
Gregory
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform