ScrollView - add / remove / add components problem

When use latest ScrollView ( from new-component-model ) and add components , remove all or some of them and add it again , ScrollView is empty . Is this a bug or need to set some option ?
On the first add everything is ok, but on the second ( after remove ) , scrollview is empty.
I’m using haxeui-openf ( new-component-model ) with target html5

Ok, so removeComponent works , but removeComponentAt bring to empty ScrollView .

Ok, sounds like a bug… any chance for a simple sample to reproduce it?


Sure. Here is a simple project
One thing, when did removeComponentAt(1); works, with setting 0 or 2 not. So maybe something with the child objects is wrong?

I’m also include the second bug with hide/show ( described here ) , just uncomment the section


Just to add something using removeAllComponents also return empty ScrolView

I’m not sure is this the same bug or other , but if you do :


for hBox2 you will see only the border, but not the text inside.
Strange, but previous it works ( on ScrollView2 class ) , so maybe something is different / wrong with the current ScrollView class.

Ok, great, ill look at this later today / tomorrow - i need to get my current changes committed first so i can work with a blank change list :slight_smile:


Hi Ian,
I’m just wondering did you have time to check add/remove problem ?

Thank you.

Whoops… totally forgot about this! Will look later today…


BTW: i created this issue to track it:

Replied on GH issue above

Incidentally there are two things to note here, one is related and another is just to “let you know”:

  1. In your original code you were using testVScroll.removeComponentAt(0) - the second parameter to this call (and removeComponent) is dispose=true, this means that you will “destroy” the underlying component which means you may get strange results when adding it again, you can set this to false to avoid this meaning HaxeUI wont try to destroy anything.

  2. I noticed in your “Lorem Ipsum” label you had “\n” (hardbreaks). There is nothing wrong with this ofc, but just in case you didnt know, if you have a width for the label (either fixed or %) then word wrapping will work just fine, eg:

var hBox2 : HBox = new HBox();
hBox2.width = 570;
var title2 = new Label();
title2.percentWidth = 100;


Thank you Ian. Everything works with dispose=true and latest changes.

Just out of curiosity did you manage to fix your SSD and restore information ?

If so , maybe you want to create some private repos on Github ( it’s already free and you can created unlimited ones ) , so keep unfinished things on second location as backup.

Thank you again for your help.

Nope, nothing about the SSD yet… the lab still has it, but im working off the priciple that its all gone (safer that way)… Im backing up work / personal work / documents etc now to a 6TB NAS and then backing up that again online… so, this shouldnt happen again - would still be nice to get the SSD back, but well, we’ll have to wait and see :frowning: