Closed tienery closed 8 years ago
what happens if you set the value first?
Setting it using an additional line of code: mainTextBox.setValue("");
doesn't seem to make much difference.
btw... there is already a value
prop
actually, thats not true... ignore me...
I will try to use the label
field see if that makes any difference.
Update: Okay, that didn't make much difference other than different symbols. Problem with Linux perhaps?
getValue
returns a wxString
not a std::string
that could be the cause of the problem.
i just implemented .value
as:
@:native("SetValue") public function setValue(value:ConstCharStar):Void;
@:native("GetValue") public function getValue():ConstCharStar;
and tried:
var textctrl:TextCtrl = new TextCtrl(frame, null, TextCtrlStyle.MULTILINE | TextCtrlStyle.RICH);
textctrl.appendText("This is line 1\n");
textctrl.appendText("This is line 2\n");
textctrl.appendText("This is line 3\n");
textctrl.appendText("This is line 4\n");
textctrl.appendText("This is line 5\n");
trace("XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX " + textctrl.value);
And it seemed to work fine... ie, trace was correct (on windows)
Have you tried it with the event binding? That's where it goes wrong for me.
This is windows though
Yeah, on Linux I'm having different results with your code as well... I'm getting this:
That is the full results, by the way, I'm not joking.
this is kinda strange though:
var label:StaticText = new StaticText(box, "Static text");
label.label = "Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.";
trace(">>>>>>>>>> " + label.label);
Is that on Linux?
nope - its something to do with the length.
TEST
is fine,
TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST
isnt.
Im guessing as @ibilon said, its something to do with a wxString conversion.
So this will be fixed soon(ish). Im currently reworking the externs with @ibilon to make the externs (and the wrappers) better, and part of that is to use wxStrings properly when appropriate. Theres a lot to get through but it'll get done eventually - you can follow progress here: https://github.com/ianharrigan/hxWidgets/tree/feature/haxe-3.3
Can you try that now from master
- the branch has now been merged and the externs correctly use wxString
which seems to overcome any issues i had with large strings, im guessing it will have a similar effect to you.
Okay, I'll try it later when I get the chance.
This seems to be fixed
Ubuntu 16.04 using latest master and dev Haxe and hxcpp
Cool, yeah, pretty sure all the string issues are fixed now since we are using wxString. Ill close this and if any more issues pop up we can deal with them as and when.
Cheers.
I went ahead to implement the
getValue()
andsetValue()
methods in theTextCtrl
as without them the control is kind of useless on its own. But testing it, I'm getting unusual results on Linux, and I was wondering if you can reproduce these results and find out what's causing it.Using the following code:
I get the following trace output: