Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Form Properties or Form Collection
Message
De
08/06/2009 13:00:41
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Versions des environnements
Visual FoxPro:
VFP 9 SP2
Divers
Thread ID:
01313565
Message ID:
01404504
Vues:
39
Naomi,

yes, that's correct. And to be honest, I don't know why, maybe some smart guy can fix this? Anyway, that's why I added the AddVar method as a replacement.
loParam.AddVar("arrSelectedForms[1]")
>Tore,
>
>Using your class does it mean we can not add properties by usual AddProperty method?
>
>E.g. this code
>
>LOCAL loParam
> loParam = CREATEOBJECT("ParameterX") && Defined in the main program
>
> loParam.AddProperty("arrSelectedForms[1]")
>
>generated Property AddProperty is read-only in the access method.
>
>Very strange.
>
>Perhaps for my purpose I can simply use empty object and AddProperty as a function?
>
>>I use one or more "parameterx" objects to store variables. The object checks if a property exists, and if not, it creates it.
>>
>>If Vartype(ofakt)#'O'
>>  oMemo=CreateObject('parameterX')
>>EndIf 
>>oMemo.nInvoice=lnInvoice
>>oMemo.lShowprice=llShowprice
>>oMemo.lLogo=.T.
>>oMemo.cJob=''
>>....
>>
>>define class ParameterX as custom
>>  function This_Access(tcMember)
>>    if type('This.' + tcMember) = 'U'
>>      This.AddProperty(tcMember)
>>    endif
>>    return This
>>  EndFunc 
>>  function AddVar(tcMember,tcData)
>>      AddProperty(this,tcMember,tcData)
>>    return This
>>  endfunc
>>EndDefine
>>
>>
>>>Not sure if I'm putting this correctly, but I found myself putting a number of properties on a form that contained patient demographic data that was passed into the form. Would it be better to create a form array (object, collection?) that contained all the different properties for the patient? How would I do that? I know how to creat a form array, but is there a different/better way to have a collection of items that will need to be in scope for the entire form?
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform