[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Objects with Widgets, Save/Restore
- Subject: Objects with Widgets, Save/Restore
- From: griffith(at)mit.edu (Brent Griffith)
- Date: 3 Aug 2001 08:19:47 -0700
- Newsgroups: comp.lang.idl-pvwave
- Organization: http://groups.google.com/
- Xref: news.doit.wisc.edu comp.lang.idl-pvwave:26010
Hi,
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).
*
tempWidgetID=self.WidgetID
1
Restore, filename, filename=self.thisobjectsavefile
*
self.widgetID=tempWidgetID
*
widget_control, self.widgetID, set_value=self.someData
Thanks in advance
Brent Griffith, GSRA, MIT, Building Technology Program