Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions haxe/ui/components/DropDown.hx
Original file line number Diff line number Diff line change
Expand Up @@ -155,9 +155,10 @@ private class DataSourceBehaviour extends DefaultBehaviour {
dropDown.text = "";
}
}

var handler:IDropDownHandler = cast(_component._compositeBuilder, DropDownBuilder).handler;
handler.reset();
if(_component._compositeBuilder!=null){
var handler:IDropDownHandler = cast(_component._compositeBuilder, DropDownBuilder).handler;
handler.reset();
}
if (_component.text == null && _component.isReady) {
dropDown.selectedIndex = 0;
}
Expand Down
6 changes: 3 additions & 3 deletions haxe/ui/macros/Macros.hx
Original file line number Diff line number Diff line change
Expand Up @@ -647,14 +647,14 @@ class Macros {
if (f.name == valueField) {
if (f.isDynamic == true) {
newField = builder.addSetter(f.name, f.type, macro { // add a normal (Variant) setter but let the binding manager know that the value has changed
behaviours.setDynamic($v{f.name}, value);
if (behaviours != null) behaviours.setDynamic($v{f.name}, value);
dispatch(new haxe.ui.events.UIEvent(haxe.ui.events.UIEvent.PROPERTY_CHANGE, $v{f.name}));
dispatch(new haxe.ui.events.UIEvent(haxe.ui.events.UIEvent.PROPERTY_CHANGE, "value"));
return value;
}, f.access);
} else {
newField = builder.addSetter(f.name, f.type, macro { // add a normal (Variant) setter but let the binding manager know that the value has changed
behaviours.set($v{f.name}, value);
if (behaviours != null) behaviours.set($v{f.name}, value);
dispatch(new haxe.ui.events.UIEvent(haxe.ui.events.UIEvent.PROPERTY_CHANGE, $v{f.name}));
dispatch(new haxe.ui.events.UIEvent(haxe.ui.events.UIEvent.PROPERTY_CHANGE, "value"));
return value;
Expand All @@ -664,7 +664,7 @@ class Macros {
} else {
if (f.isDynamic == true) {
newField = builder.addSetter(f.name, f.type, macro { // add a normal (Variant) setter
behaviours.setDynamic($v{f.name}, value);
if (behaviours != null) behaviours.setDynamic($v{f.name}, value);
dispatch(new haxe.ui.events.UIEvent(haxe.ui.events.UIEvent.PROPERTY_CHANGE, $v{f.name}));
return value;
}, f.access);
Expand Down