Dynamic load on Encodings

I been trying to dynamic load the encodings, at first I thought it was module and I would load it like this:

Encodings_DOSThai = (REALobject (*)()) REALLoadGlobalMethod(“Encodings.DOSThai() as TextEncoding”);

But that of course does not work,

So I am guessing Encodings is a bastard like Screens someone at Xojo once helped me do dynamic load on that. So if that is the case then the big question would be what is the type name of the “Encodings” static instance ?

What I am trying to accomplish in the end is to access this one here: Encodings.DOSThai.IsValidData

Well, Encodings is a module.
DOSThai is a computed property as far as I see, so you may need to try one of the property getters.

dim t as TextEncoding = Encodings.GetFromCode(1053)

maybe you can call that in plugin code.

Ah and why do you need that?
I normally set encoding with Building string or use REALConvertString to get string converted.

I need to test what a string actually is, so its UTF8 but I need to know if its actually Thai or Japanesse or something else so I need to test in which boxes it fits other than Unicode.

I will try the properties I had not thought of that, well I dont think we can call property on a module ?

But I could try to load the GetFromCode thats a good idea.

Thanks

Still does not work

void* fp = REALLoadFrameworkMethod(“Encodings.GetFromCode(encodingCode as Integer) as TextEncoding”)

just returns null

I am guessing we cannot load anything at all from modules ?

(And if so then how will all the New framework thing go ?)

I added bug case to it:

43034 - REALLoadFrameworkMethod does not work on modules

see also 40473

Yes I guess we would need that one also for classes. I think this one was Module though but we would need both I guess.

I know I am able to Load instances of my own classes that are in modules so I think that part works just not methods of modules and not shared methods as you say.