Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
GetPem() in disarray
Message
From
30/12/2016 05:01:29
 
 
To
30/12/2016 04:44:06
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows Server 2003
Database:
MS SQL Server
Miscellaneous
Thread ID:
01646177
Message ID:
01646210
Views:
60
>>>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.

not true. Check it.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform