This code used to work but when we upgraded to 10.2B0205 from 10.2B0108 it quit.
IMyInterface is an interface.
IMyInterface:GetType():ToString() gives a syntax error Could not locate element 'GetType' in class 'src.MyClass'. (12927) in 10.2B0205.
Is anyone else having this problem? This should work correctly right?
For ABL Interfaces I'd expect GetClass():FullName to work, not the GetType() method. Progress.Lang.Object has no member GetType(), which is a member of System.Object.
When that did work on an earlier patch, I'd say that a bug got fixed now.
Your guess that "a bug got fixed" was how I thought of it as well. In Visual Studio GetType() works for interfaces. The intellisense in VS shows Equals, GetHashCode, GetType, ToString, along with the interface methods and properties.
You can use the static GetClass() method on the Progress.Lang.Class object to get this stuff, in addition to the GetClass() instance method on any PLO. GetClass() is the ABL equivalent of GetType(). It's mighty useful, I find.
So,
using Progress.Lang.Class.
message Class:GetClass('OpenEdge.Core.Util.IExternalizable'):Package.
Will show "OpenEdge.Core.Util".
-- peter
bheavican schrieb:
In Visual Studio GetType() works for interfaces.
That's the point. In the Visual Studio you are defining a .NET Interface. In the ABL you are defining an ABL Interface.
GetType() is a method in the .NET Framework only. Available in the ABL only on hybrids. And as the ABL does not (yet) support Interface inheritance there are NO ABL Interfaces that inherit from .NET. Hence no GetType() on ABL Interfaces.
Any reason why GetType() used to work?
jquerijero schrieb:
Any reason why GetType() used to work?
used?
GetType() still works for .NET types.