[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Objects with Widgets, Save/Restore
Pavel A. Romashkin writes:
> By now I'd bet all David's object widgets have the same superclass, so
> all you basically need is a method for the superclass to prune and
> reattach, and the superclass probably could have the same basic widget
> id storage facility.
Actually, this is the problem. My objects are not
superclassed. My object application contains
other objects which (occasionally) contain other
objects. As you know (and anyone who reads this
newsgroup knows) one of the great attractions of
objects is that the data can be encapsulated
inside them, making them exceedingly self-contained.
Or, as I like to call them, smart.
This is good ... most of the time.
But, occasionally, and always at the worst
possible moment, you wish they were a little
more leaky (I'm making up these technical terms
as I go). That is to say, you find yourself sitting
in some object method scratching your head and
thinking to yourself that you sure wish you could
have a peek at that object over *there*, because
then life would be a whole lot easier.
But, alas, that peek requires a new method and
after you have added three or four of these you
begin to suspect there is a better way here, if
only you had been smart enough to see it three
weeks ago. :-(
But, too late, and on you go. And before you know
if you find yourself in the mornings drinking an
extra cup of coffee and lingering over The Onion
on the web, avoiding the inevitable trip into that
morass that used to be a pretty neat program.
It all turns out in the end, of course, because
you are a decent programmer and you know (sorta)
what you are doing. But for the life of you, you
can't tell whether object programming is more
efficient, or just more fun. All you really know
is that there are a few more gray hairs every
morning when you look in the mirror. :-(
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