Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Add Properties to Scatter Name Object?
Message
General information
Forum:
Visual FoxPro
Category:
Object Oriented Programming
Miscellaneous
Thread ID:
00516849
Message ID:
00516886
Views:
16
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?


>This type of "object" does not have an AddProperty method. About the best you can do is create a custom class micmicking the object an pass the variable to it for assignment. Of note in this is that you can GATHER from such an object, and, if _Access methods are present for any of the table's field name in the object, they fire.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform