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

allow extra widgets to write back their properties #76

Closed nicolaspayette closed 10 years ago

nicolaspayette commented 10 years ago

CheckBox would be a good test bed for this.

nicolaspayette commented 10 years ago

That would be a big change, but one way to do that would be to use the widgets as their own models, i.e., drop the property maps and store the widgets directly. I think that would simplify a lot of things as well.

Right now, though, the widgets expect a GUIWorkspace. We'd need a way to create them without one. Anything that affects the GUI would have to be conditional to having a reference to the GUIWorkspace.

nicolaspayette commented 10 years ago

I'm setting aside using widgets as their own models for now. Seems like it would create a lot of problems when running headless. If I can store a reference to the Writer in the PropertyDefs, that should be good enough for now.

nicolaspayette commented 10 years ago

One problem with that: a PropertyDef doesn't know its property key until after its been instantiated (because the key is set through reflection).

nicolaspayette commented 10 years ago

Fixed by (mostly) ef002cc5e6740e1c0bf04bd1f86c4eff52993e82.