Xojo.Introspection.GetTypeInfo?

How can one get Type Information using the new Xojo.Introspection framework? With the old framework:

dim ti as Introspection.TypeInfo = GetTypeInfo(ClassName)

I can not find a GetTypeInfo equivalent in the new API.

I looked into this when the new framework first came out. I think you have to use Xojo.Core.TypeInfo http://developer.xojo.com/typeinfo but you have to use an instance of the class rather than the class name. I don’t think you can do it quite like the old framework. Dunno if anything has changed recently on this.

Yes, I saw that option and see how to use it, but in many of my projects I rely heavily on GetTypeInfo(ClassName) to “register” several classes for things such as ORM, Remote Procedure Calling, etc… so I am really hoping that Xojo.Introspection.GetTypeInfo(ClassName) is introduced.

Oh, BTW, I see now why you answered as you did. I did not make myself clear, my original question should have stated "How can on get Type Information from an Object Class like GetTypeInfo. My question was vague. Sorry about that.

Recalling from memory:

This doesn’t work
Dim info As Xojo.Core.TypeInfo = Xojo.Core.GetType(SomeClass)

but this would by creating an instance of the class.
Dim info As Xojo.Core.TypeInfo = Xojo.Core.GetType(new SomeClass)

[quote=181504:@Bob Keeney]Recalling from memory:

This doesn’t work
Dim info As Xojo.Core.TypeInfo = Xojo.Core.GetType(SomeClass)

but this would by creating an instance of the class.
Dim info As Xojo.Core.TypeInfo = Xojo.Core.GetType(new SomeClass)[/quote]

Providing your class has a zero parameter constructor, otherwise it gets more complex.

Yeah, I remember asking @Joe Ranieri about it at the time but never got a satisfactory answer from him. Perhaps he can shed some light on it.

The problem with GetTypeInfo is that it’s a language-level operator that’s defined as returning a Global.Introspection.TypeInfo (i.e. the old class). Changing it to return Xojo.Introspection.TypeInfo could have unforeseen consequences and break existing code (whether loudly or silently).

It’s something we spent time thinking about when building the new framework, but it wasn’t a pressing issue compared to a bunch of other things. There definitely does need to be something like GetTypeInfo that is based off the new framework, so please file a feature request.

feedback://showreport?report_id=39087