bmos
June 21st, 2020, 20:37
PF1e 3.3.10
I've got a numbercontrol in the windowclass "charsheet_inventory" in record_char_inventory.xml that I want to change color based on the values in the field.
I have been using onValueChanged to do this, but it doesn't refresh the correct color when the value of the numbercontrol's bound databasenode is replaced by the same value that was there (I am using math.min to write the lower of two numbers to this databasenode).
See attached for a code sample.
EDIT: Of course, 30seconds after posting we found a workaround :D
Directly before the line that sets the value, I just had it set it to a bad/never accurate value and then to the correct value.
I've got a numbercontrol in the windowclass "charsheet_inventory" in record_char_inventory.xml that I want to change color based on the values in the field.
I have been using onValueChanged to do this, but it doesn't refresh the correct color when the value of the numbercontrol's bound databasenode is replaced by the same value that was there (I am using math.min to write the lower of two numbers to this databasenode).
See attached for a code sample.
EDIT: Of course, 30seconds after posting we found a workaround :D
Directly before the line that sets the value, I just had it set it to a bad/never accurate value and then to the correct value.