Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
GetPem() in disarray
Message
From
30/12/2016 15:00:32
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
 
To
30/12/2016 14:34:07
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:
01646224
Views:
44
>>It's exactly that 2nd parameter that I wish we had in getpem(), to return an array when there is one. But then it would have to be either a copy or some kind of weird reference to the array property. Anyway, issue is moot - no fixes anymore, but then no new bugs either :).
>
>Description of the function in the help says: Returns the current value for a property or program code for an event or method at design time.
>
>In the VFP 6 help at the end it states:
>> Remarks
>> GETPEM( ) is supported only during an interactive Visual FoxPro session.
>
>In the VFP 9 help:
>> In Visual FoxPro 6.0 and later, using GETPEM( ) to return method code is supported only during an interactive Visual FoxPro session. You can, however, obtain method code from an object by using its Class property, as in the following code:
>>
LOCAL oObject, lcCode
>oObject = NEWOBJECT("_form", HOME()+"ffc\_base.vcx")
>lcCode = GETPEM(oObject.class, "Release")
>
>
>From this I'd assume that the GETPEM() was probably only meant to be used in some sort of builder or utility in the development environment rather than in application code.

That's in builders. At runtime, it returns any property, only in the case of arrays it returns only the first element (just as referencing an array without indexes in an expression does). Actually it was Fabio's own trick to return member objects via getpem(), as in loCnt=getpem(thisform, "container1").

back to same old

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

Click here to load this message in the networking platform