Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
ISSUE: GETPEM can't return a array property
Message
From
06/09/2005 00:37:03
 
 
To
05/09/2005 18:20:34
General information
Forum:
Visual FoxPro
Category:
Object Oriented Programming
Environment versions
Visual FoxPro:
VFP 9
Miscellaneous
Thread ID:
01046757
Message ID:
01046891
Views:
18
>>>Expected no errors:
>>
>>>ADDPROPERTY(_SCREEN,"AA[3]")
>>>_SCREEN.AA[1]="AA[1]"
>>>_SCREEN.AA[2]="AA[2]"
>>>
>>>? GETPEM(_SCREEN,"AA") && this return the first array element
>>>? GETPEM(_SCREEN,"AA[1]") && Error
>>>? GETPEM(_SCREEN,"AA[2]") && Error
>>
>>Since you have to use Type() instead of PemStat(,,5) I'ld have half guessed at it..
>>
>>regards
>>
>>thomas
>
>Thomas ?
>
>Where is PEMSTAT in my code ?
Hi Fabio,

perhaps my answer was a bit short...
if you need to check for existance of array elements on property based arrays
ADDPROPERTY(_SCREEN,"AA[3]")
? TYPE("_Screen.AA[4]") =="U"
? PEMSTATUS(_screen, "AA", 5)
? PEMSTATUS(_screen, "AA[4]", 5)
dimension _SCREEN.AA[5]
? TYPE("_Screen.AA[4]") =="U"
? PEMSTATUS(_screen, "AA", 5)
? PEMSTATUS(_screen, "AA[4]", 5)
as you know, pemstat is of no use here and this is the context for:
>>Since you have to use Type() instead of PemStat(,,5) I'ld have half guessed at it..
The behaviour of Pemstat is similar to GetPem, insofar as indices are not supported.


regards

thomas
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform