TextEvent.LINK doesn't work? Looking to code a workaround

So I’ve been trying to get TextEvent.LINK working, and I read somewhere that it only works on the flash target. Can I get a verification on that?

Sorry if these are really rudimentary questions, but I’ve been looking around in the haxelib directory, and

haxe\lib\lime\2,0,1\legacy\project\src\common\TextField.cpp

and its accompanying header file seem to contain the relevant TextField data structure for the cpp target.

There doesn’t appear to be any tracking of hyperlink location within the TextField class, so my plan is to track that externally in Haxe, and make minimal changes to the cpp code. So my questions are:

  1. How do I expose the PointToChar function to Haxe? (Just noticed I had ExternalInterface.cpp; is it related to that?)

  2. How do I get lime to build a new .ndll file for me to use (On the assumption that this is the correct file to build)

Thanks in advance!

TextField has not been implemented in OpenFL “next” yet (it’s one of the few remaining features), I expect a number of changes (especially to support more languages). In the current native target, these are the files you’ll want:

https://github.com/openfl/openfl/blob/master/openfl/_v2/text/TextField.hx
https://github.com/openfl/lime/blob/master/legacy/project/src/common/TextField.cpp

When you use a source repository build of Lime, use lime rebuild <target> -Dlegacy to rebuild that binary, like lime rebuild linux -Dlegacy or whatever you are testing. Let me know how it goes :slight_smile:

Tried building the windows target; getting tons of problems with OpenGL. Am I missing something?

Output from the build attempt

Alternatively, when is the new TextField going to be implemented, and will it include TextEvent.LINK for all targets?

Thanks,

This bug just snuck into the builds, if you git pull you should be able to rebuild now :smile:

The plan would be to include it in the new TextField, but I don’t have a time estimate