Why Object Widgets [message #18152] |
Thu, 02 December 1999 00:00  |
J.D. Smith
Messages: 214 Registered: August 1996
|
Senior Member |
|
|
Recalling the discussion on why object-oriented widget programming was useful, I
just came upon a most critical reason while delving into some old non-OO widget
code: the dreaded "% Expression must be a structure in this context: STATE."
statement!
Since object heap data is persistent and doesn't rely on pointer manipulation,
when an object widget (objet anyone?) program crashes, simply fix, recompile,
and continue working without restarting the application! Freed from the tyranny
of the STATE variable.
JD
--
J.D. Smith |*| WORK: (607) 255-5842
Cornell University Dept. of Astronomy |*| (607) 255-6263
304 Space Sciences Bldg. |*| FAX: (607) 255-5875
Ithaca, NY 14853 |*|
|
|
|
Re: Why Object Widgets [message #18272 is a reply to message #18152] |
Sun, 05 December 1999 00:00  |
Marc Schellens
Messages: 14 Registered: November 1999
|
Junior Member |
|
|
"J.D. Smith" wrote:
>
> Recalling the discussion on why object-oriented widget programming was useful, I
> just came upon a most critical reason while delving into some old non-OO widget
> code: the dreaded "% Expression must be a structure in this context: STATE."
> statement!
>
> Since object heap data is persistent and doesn't rely on pointer manipulation,
> when an object widget (objet anyone?) program crashes, simply fix, recompile,
> and continue working without restarting the application! Freed from the tyranny
> of the STATE variable.
>
> JD
I think object oriented widgets are more elegant and object oriented
programming makes, for sufficient complex programs at least your life
much easier, but in this case (STATE variable) I help myself, just by
not setting the NO_COPY keyword. For all programs I worked on so far I
could not notice any difference in speed.
:-) marc
|
|
|
Re: Why Object Widgets [message #18275 is a reply to message #18152] |
Sat, 04 December 1999 00:00  |
davidf
Messages: 2866 Registered: September 1996
|
Senior Member |
|
|
Marc Schellens (m_schellens@hotmail.com) writes:
> I think object oriented widgets are more elegant and object oriented
> programming makes, for sufficient complex programs at least your life
> much easier, but in this case (STATE variable) I help myself, just by
> not setting the NO_COPY keyword. For all programs I worked on so far I
> could not notice any difference in speed.
Yikes! Guess you don't have much of anything in that State
variable. Put a couple of images in there and you will
notice some speed difference. :-)
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
|
|
|