Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
BUG: Parent property and PEMSTATUS
Message
From
14/08/2005 07:50:03
 
 
To
14/08/2005 06:56:19
General information
Forum:
Visual FoxPro
Category:
Object Oriented Programming
Environment versions
Visual FoxPro:
VFP 9
Miscellaneous
Thread ID:
01040740
Message ID:
01040765
Views:
16
>>Because Parent is not usable, expected a Hidden or Protected setting
>>
>>* Expected no errors
>>=CREATEOBJECT("myForm1")
>>
>>DEFINE CLASS myForm1 AS Form
>>	PROCEDURE Load
>>		IF	PEMSTATUS(m.this,"Parent",5)	;	&& Expected .F.
>>		AND NOT PEMSTATUS(m.this,"Parent",2)		&& Expected .T.
>>			? GETPEM(m.this,"Parent")		&& Then : Error 1924
>>		ENDIF
>>		RETURN .F.
>>		
>>	PROCEDURE eRROR
>>		LPARAMETERS nError, cMethod, nLine
>>		? nError,MESSAGE()
>>ENDDEFINE
>>
>>Same for ActiveForm,ActiveControl ....
>________________________________________________
>Fabio,
>
>What do you mean by 'parent is not usable' ??
>
>Why do you want 'parent' to be hidden ?
>
>
>As I see it, Parent can have a value, it is just not defined in the context above and hence the error

Of course, if Parent ( or ActiveForm,ActiveControl ) is a object then
it must to be readable,
and PEMSTATUS(m.this,"Parent",0) return .T.

When Parent is not defined, then:
- My first choice is Parent return a NULL object
- or Parent is hidden and PEMSTATUS(m.this,"Parent",5)=.F.

Now, the only way is that to produce an error,
and to make to capture it from TYPE () that then returns "U"

A really absurd slow complication.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform