TypeExist( string classname ) return boolean

This method return if the specified classname class definition can be found or not in a more concises and readable way than the usual used one.

Instead of :

...
classdefinition lcdef
my_class lo_myclass
...

lcdef = findclassdefinition( "my_class" )
if not isnull( lcdef) and isvalid( lcdef ) then
lo_myclass = create my_class
...
end if
...

Use :

...
my_class  lo_myclass
...

if #.TypeExists( "my_class" ) then 
   lo_myclass = create my_class
   ...
end if
...



Last edited Nov 26, 2015 at 9:38 PM by domangep, version 4