Hola.
¿Alguien ha usado la clase ClassDefinition de PB?
En el código que viene de ejemplo en PB no funciona porque sd toma un valor nulo cuando se ejecuta c_obj.FindMatchingFunction( "Find", ls_args)
¿Alguna sugerencia?
Gracias de antemano
string ls_args[]
string s, lineend
integer li
ScriptDefinition sd
ClassDefinition c_obj
ls_args[1] = "string"
ls_args[2] = "long"
ls_args[3] = "long"
c_obj = CREATE classDefinition
sd = CREATE ScriptDefinition
sd = c_obj.FindMatchingFunction( "Find", ls_args)
IF NOT IsValid(sd) or isnull (sd) THEN
messagebox ("", "No matching script")
ELSE
//The uf_scriptinfo function gets information about the function that matched the signature and builds a string. Scriptobj is the ScriptDefinition object passed to the function:
lineend = "~r~n"
// Script name
s = s + sd.Name + lineend
// Data type of the return value
s = s + String (sd.ReturnType) + lineend
//.DataTypeOf
// List argument names
s = s + "Arguments:" + lineend
FOR li = 1 to UpperBound(sd.ArgumentList)
s = s + sd.ArgumentList[li].Name + lineend
NEXT
// List local variables
s = s + "Local variables:" + lineend
FOR li = 1 to UpperBound(sd.LocalVariableList)
s = s + sd.LocalVariableList[li].Name + lineend
NEXT
messagebox ('', s)
END IF