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

Home » Public Forums » archive » Re: Saving an application state
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: Saving an application state [message #39825] Mon, 21 June 2004 17:55
Paul Sorenson is currently offline  Paul Sorenson
Messages: 48
Registered: May 2002
Member
D'oh! IDL would say "% Syntax error"! Thus my widget objects are destined to
punch out on the ol' time clock and "party on down" every time I want to
re-create them :-)

-Paul Sorenson
www.paulsorenson.com

"Mark Hadfield" <m.hadfield@niwa.co.nz> wrote in message
news:cb7l84$2g3$1@newsreader.mailgate.org...
> Paul Sorenson wrote:
>>
>> Hmmm. Should that method name be spelled "Re-CreateWidgets", with a
hyphen?
>> What would my English teachers say :-0
>>
>
> I think you should worry more about what IDL would say. Unless you're
> going to get your English teacher to compile your code!
>
> --
> Mark Hadfield "Ka puwaha te tai nei, Hoea tatou"
> m.hadfield@niwa.co.nz
> National Institute for Water and Atmospheric Research (NIWA)
Re: Saving an application state [message #39830 is a reply to message #39825] Mon, 21 June 2004 14:51 Go to previous message
Mark Hadfield is currently offline  Mark Hadfield
Messages: 783
Registered: May 1995
Senior Member
Paul Sorenson wrote:
>
> Hmmm. Should that method name be spelled "Re-CreateWidgets", with a hyphen?
> What would my English teachers say :-0
>

I think you should worry more about what IDL would say. Unless you're
going to get your English teacher to compile your code!

--
Mark Hadfield "Ka puwaha te tai nei, Hoea tatou"
m.hadfield@niwa.co.nz
National Institute for Water and Atmospheric Research (NIWA)
Re: Saving an application state [message #39831 is a reply to message #39830] Mon, 21 June 2004 12:34 Go to previous message
Paul Sorenson is currently offline  Paul Sorenson
Messages: 48
Registered: May 2002
Member
Hi, Rob.

I modified XOBJVIEW to do this. You can see how I did it in code and notes
given (via links) in http://www.paulsorenson.com/underthehood.html . See...

METHOD: PCSexObjViewWid::ReCreateWidgets .

Dick Jackson gave me lots of suggestions and examples for that part.

Hmmm. Should that method name be spelled "Re-CreateWidgets", with a hyphen?
What would my English teachers say :-0

-Paul Sorenson
www.paulsorenson.com

"Rob Dimeo" <robert.dimeo@nist.gov> wrote in message
news:cb539436.0406210649.5d2ecf19@posting.google.com...
> Hi,
>
> We have had a number of requests from our software users to be able to
> save the "state" of the GUI application prior to closing it so that
> users can restore it at a later time. The GUI applications are
> typically written as object widgets that can contain many other
> objects. The relationship with the the GUI and other objects can be
> has-a and is-a. I know that there are certain tricks related to
> saving objects and restoring them (as discussed on this NG) but I
> don't have that much experience doing this myself. I am probably
> asking too much but....is there a straightforward way to modify
> existing object widgets that allows the user to save and restore the
> widget state?
>
> Many thanks in advance,
>
> Rob
Re: Saving an application state [message #39840 is a reply to message #39831] Mon, 21 June 2004 08:16 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Rob Dimeo writes:

> We have had a number of requests from our software users to be able to
> save the "state" of the GUI application prior to closing it so that
> users can restore it at a later time. The GUI applications are
> typically written as object widgets that can contain many other
> objects. The relationship with the the GUI and other objects can be
> has-a and is-a. I know that there are certain tricks related to
> saving objects and restoring them (as discussed on this NG) but I
> don't have that much experience doing this myself. I am probably
> asking too much but....is there a straightforward way to modify
> existing object widgets that allows the user to save and restore the
> widget state?

I wish. :-(

I think the short answer is iTools.

What RSI has done in iTools is decouple the GUI representation
of the object from the object itself. This is a fantastic
idea. It means you can easily store the state of an object
application and restore it later without having to think about
widget identifiers. Of course, the price of this feature is
an enormous increase in complexity, which I think makes iTools
so complicated no one outside of RSI can use it. (Which, I have
been thinking lately, must really be the Plan. :-)

In simple object widget applications, it is easy enough
to simply divorce the graphical part of the object
from the rest of the program (probably via a GUI method that
simply builds the graphical user interface). "Saving" the
state then simply becomes saving everything *except* the GUI.

I find, though, that it works better in theory than it
does in practice. In practice, at least using the widget
objects I use daily, objects are so intertwined that saving
an object often means creating save files 12-15 MBytes in
size! Mostly because IDL is doing the right thing and saving
the *connections* between objects as well as the objects
themselves. It's just that that's not what I want!
Well, it's what I want. I just don't want it right now. :-)

I've thought about this a lot (and JD has written about
his method for doing this several times in this newsgroup).
I think I actually have a method for doing this in my
Catalyst Library that would work with a LOT less complexity
than the iTools model. But, unfortunately, it would involve
some rather major modifications that I have not found time
to implement yet.

In the meantime, I think the alternatives are to invest a
couple of years learning iTools, or just muddle our way
through using what we already know. :-)

Cheers,

David

--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Maximum Likelihood Classifier
Next Topic: Re: 3D images

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

Current Time: Fri Oct 10 08:17:58 PDT 2025

Total time taken to generate the page: 0.56293 seconds