Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Amembers() problem
Message
From
12/02/2019 13:00:59
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows 10
Network:
Windows Server 2012 R2
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01666312
Message ID:
01666334
Views:
47
>>>I have an object with some properties.... In the debug i can see al properties, but when i use amembers it returns an incorrect number....11 instead the real number of properties contained in the object... Look at the image where you can see all the properties and the the amembers() result...
>>
>>How are you getting the object reference? In particular, if you're getting it from a FOR EACH loop, make sure that you use the FOXOBJECT keyword so you get a VFP object rather than a COM object.
>>
>>Tamar
>
>With the result of amembers() i make a simple for loop...
>i tried with for each but i had errors....have you an example about a for each with a simple object like mine iit is similar to that you can get from a scatter command

I wasn't asking how you're going through the properties, but rather how you're getting the object whose properties you're trying to discover. I see elsewhere in the thread that it appears to be a COM object of some sort. What should work in that case is passing 3 for the third param:
nPEMCount = AMEMBERS(aHoldPEMS, oCOMObject, 3)
Just tried that with a Word.Application object and it works as expected.

Tamar
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform