Open MangelMaxime opened 10 years ago
Does this work on other platforms? (neko/cpp)?
You have right, I forgot to add the #if flash etc. condition.
It's not working for neko/cpp at the moment because I need to write one of the flash function by myself. Sorry about that...
In fact, like you said in this issue https://github.com/openfl/openfl/issues/205, there are essentials part missing for the neko/cpp target.
So best thing, we can to is to surround my code with a condition #if flash..
Just for information, your tab isn't work on neko/cpp too.
Is there any chance you open a new issue for the tabs on cpp/neko in the main haxeui repo? Ive been using tabs with no problems on those targets. (Maybe with a screen shot or something like that?)
Cheers, Ian
For the tab, this is because neko/cpp targets don't implements the selection for what I saw on OpenFL.
You use :
replaceSelectedText(" ");
But, this function is implemented only for the flash target. This is what I mean by the tab replacement doesn't work on neko/cpp.
public function replaceSelectedText(s:String):Void {
var tf:TextField = cast(_textDisplay.display, TextField);
#if flash
tf.replaceSelectedText(s);
#end
}
I will open an issue if you want but at the moment this is more an OpenFL issue like you have opened here
The added code allow the user to remove the indentation when he place his cursor at the beginning of a line and press Shit+Tab.
It's try to remove 4 spaces at max.