Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Set and Get appl obj property good practice
Message
 
 
À
14/08/2009 17:31:28
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 9 SP1
Divers
Thread ID:
01415630
Message ID:
01418187
Vues:
48
You should try first.

>No, you can't use the Addproperty method, you get an error, "Property addproperty is read-only"
>
>
>>It's not identical. The AddVar() method has been removed intentionally. You can use ADDPROPERTY() method to add properties to the object.
>>
>>>Your code is identical to mine, except for the Addvar function which I added since I actually needed the Addproperty method in one special case. Since Addproperty was overridden and not available, I added the Addvar function as a replacement. But I admit that I only very rarely use the Addvar function.
>>>
>>>>What about simpler version below.
>>>>
>>>>DEFINE CLASS ParameterX AS Custom
>>>>	FUNCTION This_Access(tcMember)
>>>>		IF NOT PEMSTATUS(This, tcMember, 5)
>>>>			This.ADDPROPERTY(tcMember, NULL)
>>>>		ENDIF	
>>>>		RETURN This
>>>>	ENDFUNC
>>>>ENDDEFINE
>>>>
--sb--
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform