Hey Guys,
I think I’ve come across a pretty nasty bug:
When you have a onDataChange() event on a field (just normal, servoy text field - or a bootstrap text field) and that field is bound to a scope variable, it doesn’t update.
I’ve attached a small sample file to demonstrate… but basically:
- Create a form variable (text)
- Create a scoped variable (text)
- Place two fields on your form - one with the form variable as the dataprovider and the other with the scoped variable
- Create the following method:
function onDataChange(oldValue, newValue, event) {
var sFldName = event.getElementName(),
sFrm = event.getFormName();
newValue += "ing";
forms[sFrm][forms[sFrm].elements[sFldName].getDataProviderID()] = newValue;
return true
}
- Attach the SAME method to the onDataChange event of both fields
What you’ll see is - the field with the FORM variable updates, the field with the scoped variable DOES NOT.
[attachment=1]onChangeBug.png[/attachment]
[attachment=0]dataChangeBug.servoy[/attachment]
dataChangeBug.servoy (4.24 KB)