Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Add Properties to Scatter Name Object?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Programmation Orientée Object
Divers
Thread ID:
00516849
Message ID:
00516893
Vues:
21
>Before I read your post (I'm still playing with this), I tried this and I almost get there:
>
>Public oData
>Select PreImport
>oData = CreateObject("Record")
>For nFld = 1 to FCount()
>	oData.AddProperty(Field(nFld))
>EndFor
>oData.AddProperty( "BillCode" , "B")
>oData.AddProperty( "Org_Unit" , "Unk   ")
>oData.AddProperty( "OrigDate" , Date() )
>oData.AddProperty( "OrigTime" ,Time() )
>oData.AddProperty( "OrigAid" , "XXXX")
>oData.AddProperty( "ModDate" , Date() )
>oData.AddProperty( "ModTime" , Time() )
>oData.AddProperty( "ModAid" , "XXXX")
>Define Class Record as Custom
>EndDefine
>
>But my problem now is that I can't just "Scatter Name oData" because the object I just made gets obliterated. I think I will have to "Scatter Name oDataTemp" and then iterate through that, copying values from it to my oData object, and then "Gather Name oData" to my result table. Kind of kludgy. Is that the only way?

Yep, unfortunately. That's why, in my previous post I mentioned that you'd have to pass the original object as a parameter with CREATEOBJECT() and initialize the property values in the Init event.
George

Ubi caritas et amor, deus ibi est
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform