StableXUI scrollers with no slider if "heightPt" used (solved, but bug)

I just encountered an interesting bug in StableXUI (1.1.4): when a <scroll> was built with “heightPt=0,” it appeared with no slider in the bar!

Investigation finally led me to “Scroll.hx->_update(),” where I discovered that “this.vBar.h” was equal to zero … as was “–height.”   (The actual identifier-name starts with an underscore.)   But the property “heightPt” was equal to 100.

Digging further, into “widget.hx,” I see that there is a flaw in the logic for getting/setting these properties.   If the object does not have a parent (yet), the value of (say …) “heightPt” is stored, but “–height” is not calculated.

Obviously, it can’t be … yet.   But, I think, that calculation should be deferred in such a way that it does take place as soon as the object is added to some parent.

To circumvent the problem, I had to add this ugly-hack into the defaults.xml file entry for <Scroll>:

on-display = " $this.vBar._height = $this.height / ( $this.numChildren == 0 ? 1.0 : $this.numChildren ); "

It’s an incomplete solution, which literally stuffs a value into the supposedly-private variable.   (Attempting to set the vBar’s “.height” property didn’t work.) The logic as-shown tries to set the height of the slider proportionate to the number of elements in the list.

On another point, I’ve also observed that scrolls do not respond properly to mouse-wheel (on OS/X), reacting only if the mouse wheel is in the slider bar, and then not perfectly. I should be able to use the mouse wheel within the content portion of the scroll-box. Casual attempts to do that caused GPF’s, probably related to the width/height issues aforementioned i.