Is TextArea ready to use in production ? in OpenFL Backend?

Hi,

so it’s first time i am using TextArea component in fresh OpenFL project.

the problem is that it’s too slow and the scroll bars are not working cool .

i wan to render 123 lines of XML text in to the view and want to edit it in the browser.

Here is the code:

class XMLView extends Sprite
{
	private var ui:HaxeUIApp = null;
	private var txtArea:TextArea = null;

	public function new()
	{
		super();
		this.addEventListener(Event.ADDED_TO_STAGE, init);
	}

	private function init(e:Event):Void
	{
		this.removeEventListener(Event.ADDED_TO_STAGE, init);

		ui = new HaxeUIApp();
		ui.ready(onUIReady);
	}

	private function onUIReady():Void
	{
		txtArea = new TextArea();
		txtArea.width = 482;
		txtArea.height = 566;

		this.addChild(txtArea);
		txtArea.text = "MY LONG LONG XML";

		ui.start();
	}
 
}


i am using new-component-method branch.

i also tested it with Html5 backend and it is working smoothly.

thanks

Do you have the xml file you are trying to test with it also?

Hmmm, yeah, i see what you mean… i added 100 lines of text and the scrollbar isnt scrolling properly… ill check it out

Ok, this should be fixed now (and a few other things)… the issue was that i had made assumptions that maxScrollV and scrollV were in pixels, and they werent they are in number of lines (and 1-based)… Currently there isnt a pagesize for these scrollbars as i think there might be an issue with openfl: https://github.com/openfl/openfl/issues/2220 - unless im totally off - maybe there is a way currently get the number of total visible lines (which would be needed for page size).

Finally regarding perf… the textfield in openfl seems to work “fine” for about 100 lines… however, after that things get jittery. Ive tried with 1000 lines and its basically not usuable anymore. Note, this isnt using haxeui project, just a pure openfl project (the test app in the openfl issue above essentially), so i suppose we have to hope that the perf of the openfl textfield improves. Not must else i can suggest around that area.

Hope this helps somewhat.
Ian

PS: you’ll need new haxeui-core and haxeui-openfl (new-component-branches)

Hi, thank you for taking time to fix it, i just tested it with the updates and it is way better then before.
OpenFL text fields aren’t getting enough love. i am planning to test each of the component one by one this week to test things out, i want to use HaxeUI in our next corporate software most probably targeting ElectronJS and HTML5 so i will be asking allot of stupid questions too, may be :D.

thanks

1 Like

No worries… not sure how id missed that to be honest, i dont use the openfl backend that much in reality, so i guess it just slipped past me.

Certainly ask away, always interesting to see what other people are using haxeui for :slight_smile: . Screen shots always welcome :wink:

Im planning on an official v1.0.0 haxelib release next week so no more new-component-method branches!

For sure :slight_smile:

this is great news.