Message
From
30/12/2016 04:44:06
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
 
To
29/12/2016 09:26:46
General information
Fórum:
Visual FoxPro
Category:
Classes - VCX
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows Server 2003
Database:
MS SQL Server
Miscellaneous
ID da thread:
01646177
ID da mensagem:
01646209
Views:
136
>>Just for kicks, tried this:
>>
>>
oo=createobject("custom")
>>addproperty(oo, "arr[3,2]","zz")
>>oo.arr[1,1]="bbzz"
>>?getpem(oo, "arr")
>>?getpem(oo, "arr[2,2]")
>>
>>The debugger shows that oo has an array property, all six elements of which have the value of "zz" except "bbzz" in the first. The first output shows a "zz", the second throws an error, "Function argument value, type, or count is invalid.", which means that the 2nd parameter will accept only names, not names with index. Ditto when trying with a single index.
>>
>>Too bad, I just wanted to avoid using a bunch of macros to store about a dozen arrays into properties of an object. Now it will have to be the same old quick & dirty.
>
>
>?eval("oo."+"arr[2,2]")
>
Eval() is only slightly better than macro - that's what I eventually did, that's the quick and dirty.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Previous
Next
Responder
Mapa
View