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 #26097 is a reply to message #26096] Fri, 03 August 2001 14:07 Go to previous messageGo to previous message
david[2] is currently offline  david[2]
Messages: 100
Registered: June 2001
Senior Member
JD Smith writes:

> The secret is this same notion of pruning out the bits you don't need.
> Here's a sketch of how I'd approach your problem.
>
> pro DavidsPlayhouse::Restore
> oldself=self ;for killing later
> wInfo=self.wInfo ;save the GUI, eat soy products
> self.wInfo=ptr_new() ;detach, avoiding the carnage
> restore_obj, self.SaveFile ;travel back in time
> obj_destroy,oldself ;kill our old self, except wInfo
> self.wInfo=wInfo ;reattach our saved widget info
> self->UpdateGUI ;I'm not who I think I am
> end

Humm. Since I'm within hours of delivering
the first truly production version of this
code, I'm loath to open up this topic again.

But I think now what got me into trouble
is that inside my larger application, which
is written as an object, there was an
ROI Window Object. This is a compound widget
(window) that doesn't have any notion of what's
inside it, but it can draw various types of
ROI's on itself. This too is written as an object,
and it reports its results (perimeter points,
interior indices, etc.) to the event method handler
of the parent widget object when the ROI
is completely drawn. Of course, it relies on
widget identifiers to communicate with its
"parent" properly. And it has it's own widget
identifiers to deal with.

It seems to me that I could not get this
interior widget object fired up correctly.
Although it seems to me now (as then) that
the approach you outline above should work in
both cases. And, of course, that is what I
*thought* I was doing.

But when the customer is paying you big bucks
and is already happy with the design, it seems
the height of arrogance to spend yet more time
on niggling cosmetic problems. Especially when
the other solution was so easy (it took me about
10 minutes to implement). Even my overly
obsessive compulsion for neatness can be
bought at the right price. :-)

But I'll have another go next time. I'm convinced
it has to work. Maybe when I figure it out I'll
have enough material for that object book.

Cheers,

David

--
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 18:40:50 PDT 2025

Total time taken to generate the page: 0.00459 seconds