[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Objects with Widgets, Save/Restore


I am using a handful of home-made objects (thanks to RCK's book) in a
application with lots of widgets.  I am trying to use SAVE and RESTORE
to get my objects back to where they were in a previous run of the
application.  I have it sort of working but would appreciate seeing
some examples of an "object's restore method".

For example, is there an elegant way to deal with the widget IDs and
values?  I am storing widgetIDs in the object for widget_control
statements, but the newly created widgets generally have different IDs
than the old Saved-object.  I find myself repeatedly writing the same
statements for each and every widget that might get its value changed
-- see example statements below (* and 1 indicate multiplicity).


    Restore, filename, filename=self.thisobjectsavefile


    widget_control, self.widgetID, set_value=self.someData

Thanks in advance

Brent Griffith, GSRA, MIT, Building Technology Program