CRESS-Surrey / eXtraWidgets

An extension for creating additional interface tabs in the NetLogo GUI and putting custom widgets on them.
MIT License
13 stars 4 forks source link

What should we do if we try to change the kind of a widget? #18

Closed nicolaspayette closed 9 years ago

nicolaspayette commented 10 years ago

My intuition is that we should try to remove the old widget and create a new one with the same property values for the new kinds. A lot of properties will make sense for all kinds anyway (e.g. x, y, color, etc.) Those that don't can be thrown away.

If we do that, that probably should be taken care of in reader.onChange.

Another possibility is just to raise an error.

nicolaspayette commented 10 years ago

Not allowing user to provide custom property maps would prevent this as well.

nicolaspayette commented 9 years ago

Closing this, as it is just a matter of making the kind property read-only (#70).