01org/rib — pull request #60 by grgustaf (2012-06-14 19:23:36+00:00)
Title: [Widgets] Fix boolean property values to use actual JS booleans

Originally, we implemented boolean properties by using the "oneof" string property type [ "true", "false" ]. When we converted these to be a new "boolean" type, shown in the property view as a checkbox, we should have used actual JS boolean values true and false. But instead we had a mixture where some places we used a boolean and some places we used a string. Since the string "false" is JS "truthy", this caused some confusion and therefore bugs.

This patch fixes all the "defaultValue" settings to use actual booleans, so hopefully the pattern will stick. Note, you may have old design files that have recorded the invalid "true" and "false" settings. I believe thanks to some defensive code Shane had already added to property.js, these will still be read in properly.

I tested all the affected widgets and the properties seem to work correctly for me. I tried to look through all the code for getProperty calls that might be affected by this change and I don't think any have slipped through the cracks, but I thought I'd submit this as a PR for review in case someone else can find something.