yuuchilyann / blockly

Automatically exported from code.google.com/p/blockly
0 stars 0 forks source link

Enhancement: Please extend FieldCheckbox by a change_handler #92

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Dear all,

I would like to use a FieldCheckbox instead of a FieldDropdown block component 
to change the colour of my block, change text, or similar.

Unfortunately, the functionality, which is available for the FieldDropdown is 
not available within FieldCheckbox. 

It would be nice if you could adapt the FieldDropdown change_handler to be 
usable within FieldCheckbox.

best regards
Marc   

Original issue reported on code.google.com by borntob...@googlemail.com on 5 Dec 2012 at 10:51

GoogleCodeExporter commented 8 years ago
Done (r557).

All editable fields now accept an optional change handler.  If this function 
returns nothing (undefined), then the change is accepted.  If this function 
returns null, then the change is aborted.  If this function returns a value, 
then this value is used in place of the user's selection.

Thanks for the bug!

Original comment by neil.fra...@gmail.com on 30 Dec 2012 at 9:29