Skip to content

Commit d99f962

Browse files
authored
Update Range.hx
1 parent c27ba78 commit d99f962

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

haxe/ui/components/Range.hx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,11 @@ private class RangeEnd extends DataBehaviour {
158158
@:access(haxe.ui.core.Component)
159159
private class AllowInteraction extends DefaultBehaviour {
160160
public override function get():Variant {
161-
return (_component._internalEvents != null);
161+
#if (haxe_ver < 5)
162+
return _component._internalEvents != null;
163+
#else
164+
return @:privateAccess Variant.fromBool(_component._internalEvents != null);
165+
#end
162166
}
163167

164168
public override function set(value:Variant) {
@@ -266,4 +270,4 @@ class RangeBuilder extends CompositeBuilder {
266270
var name = _component.className.split(".").pop();
267271
trace("WARNING: trying to create an instance of '" + name + "' directly, use either 'Horizontal" + name + "' or 'Vertical" + name + "'");
268272
}
269-
}
273+
}

0 commit comments

Comments
 (0)