comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: Objects with Widgets, Save/Restore
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Objects with Widgets, Save/Restore [message #26108 is a reply to message #26105] Fri, 03 August 2001 10:09 Go to previous messageGo to previous message
david[2] is currently offline  david[2]
Messages: 100
Registered: June 2001
Senior Member
Brent Griffith writes:

> 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

Yes, this can be a problem. Widgets, of
course, receive a unique ID each time the
creation routine is run.

I'm not sure I have a sure-fire solution for
you, although I also have a large widget program
with lots of objects running, and I can save
and restore the current session. At least I can
after a fashion.

I guess the secret is to have some kind of GUI
method for the object widget that builds the
interface. I find this has to be separate from
the INIT method. This allows you to build a
new interface from the restored object, thus
getting all your widget identifiers sorted out
again.

I played with it for days trying to keep the
current GUI (which, of course, has the RESTORE
button on it), but no matter what I tried (and
I thought I tried some pretty sophisticated
things) I couldn't get it to work. So now when
you hit the RESTORE button, the GUI disappears
and comes back a second later with the old
session up and ready to go.

Cheers,

David

P.S. Let's just say I've had to learn to appreciate
momentary window flashing. But it is only me. My
customer has never cared two figs one way or the
other. He's just thrilled he can pick up where he
left off for lunch yesterday! :-)

--
David Fanning, Ph.D.
Fanning Software Consulting
Phone: 970-221-0438 E-Mail: davidf@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: rename and move files
Next Topic: Objects with Widgets, Save/Restore

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 19:02:39 PDT 2025

Total time taken to generate the page: 0.00195 seconds