SynchronizingWidgets

From ParaQ Wiki
Revision as of 11:29, 4 April 2006 by Clinton (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

We need a way to keep widgets synchronized with each other. For example, if a slider bar and a line edit both represent the same property, changes to one widget should automatically be reflected in the other widget. This is somewhat independent of the update mechanism for sending changes to the server manager.

My proposal is to make a class that the widgets register themselves with. If one widget changes, the others can be automatically notified and updated.

We can even make it keep track of original values. If the update button is pressed, it can query this synchronization system to see what changed and send a minimum amount of changes to the server manager. Likewise, if the reset button is pressed, all the original values are restored without the server manager knowing anything changed.