Q: Progress equivalent of c# myVariable.GetType().Name? Is there a Progress equivalent for C# myVariable.GetType().Name?
With an interface or a base type variable, can we find back the name of the real type instanciated?
ShowRealType(NEW myUserDefinedError()).

METHOD PUBLIC VOID ShowRealType(viError AS Progress.Lang.ERROR):
    MESSAGE /***** NEED CODE TO FIND THE REAL TYPE OF viError here ******/        VIEW-AS ALERT-BOX.
END METHOD.

I've tried viError:GetClass():ToString(), but its gives Progress.Lang.Class_1025 instead of myUserDefinedError.


A: You can do something like
METHOD PUBLIC VOID ShowRealType(viError AS Progress.Lang.ERROR):
    // validate that it's really an object
    if valid-object(viError) then
    MESSAGE viError:GetClass():TypeName
        VIEW-AS ALERT-BOX.
END METHOD.

