>>>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) ;
>>> AND NOT PEMSTATUS(m.this,"Parent",2)
>>> ? GETPEM(m.this,"Parent")
>>> 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.
I'm not in favour of changing the return of pemstatus(). The property is defined. It's only the value that is not at that point in time
A return of a null value would make more sense imo and I guess that the error is, ahem, by design
Gregory