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:
- 1. Create a form variable (text)
- Code: Select all
function onDataChange(oldValue, newValue, event) {
var sFldName = event.getElementName(),
sFrm = event.getFormName();
newValue += "ing";
forms[sFrm][forms[sFrm].elements[sFldName].getDataProviderID()] = newValue;
return true
}
2. Create a scoped variable (text)
3. Place two fields on your form - one with the form variable as the dataprovider and the other with the scoped variable
4. Create the following method:
5. 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.