Fabio,
>If VFP put NULL, it remove limbo state and VARTYPE(ox.parent) return "X"
>without touch it's code implementation.
I don't know why parentless objects were not assigned null as the value. This goes all the way back to VFP3. It is a rare event for Microsoft to change behavior like this because to keep from breaking existing code.
TYPE( "blah.Parent" ) != O has always detected an object that doesn't have containership. So simply use it instead of trying to get vartype() to do something it's not meant to do. If youwant vartype() to work like type() you will slow it down.
>Because TYPE() not support UDF, on VFP not exist a function in order to resolve the datatype of one generic expression.
Can you give me an example of what you are talking about? ? type( sys(1) ) prints out N for me.
>Yes, i can use EVAL() within TRY...ENDTRY, but fire a error for know
>a value he is too much heavy, at least for me ( 1000x slow down ).
This is only a significant amount of time if the code is executed tens of thousands of times. If you have a situation where you'd actually have to query an object to see if it's contained that many times I'd write the code something like this:
this.lIsContained = ( type( "this.parent" ) == "O" )
if ( this.lIsContained )
else
endif
It really doesn't get much easier than that.