Loading the new Color methods

How are we supposed to load the new color methods since the old have been deprecated.

As far as I know Color is not a class ? so getting ClassRef would not work.

And trying to do it like this returns null:

TextColor_fp = (ColorGetterProc)REALLoadFrameworkMethod(“Color.TextColor() as Color”);

if(TextColor_fp == NULL)
{
NSLog(@“Checkpoint Color.TextColor() failed”);
}

Well, TextColor is a method in a module named Color. That may cause a disambiguity in the parser with also the datatype Color.

Seems like “TextColor() as Color” may work.

Yes I know that one works but that one is the deprecated one.

Maybe @William_Yu can lookup what REALLoadFrameworkMethod does.

It looks like we’ll need to explicitly add/expose some of these for dynamic access. Please file Feedback case(s) for ones that are not working and we’ll take a look, thanks.

64839 - Dynamic load new Color methods in plugin sdk since old have been deprecated.

I filed it as bug and not feature request since after all the old ones were deprecated and new ones we are supposed to use cannot be loaded, making it a bug.

Forum for Xojo Programming Language and IDE. Copyright © 2021 Xojo, Inc.