Re: Source Code: A min/max compound widget [message #12934] |
Thu, 24 September 1998 00:00 |
Doug Larson
Messages: 10 Registered: September 1998
|
Junior Member |
|
|
<HTML>
<FONT FACE="Courier New,Courier">David Fanning wrote:</FONT>
<BLOCKQUOTE TYPE=CITE><FONT FACE="Courier New,Courier">Rose (rmlongfield@my-dejanews.com)
writes:</FONT><FONT FACE="Courier New,Courier"></FONT>
<P><FONT FACE="Courier New,Courier">>
I am re-visiting the construction of compound widgets, having had not</FONT>
<BR><FONT FACE="Courier New,Courier">> so much success a few months ago
when first starting widgets. I'll probably</FONT>
<BR><FONT FACE="Courier New,Courier">> be studying your program to hopefully
get some ideas, in particular, the use</FONT>
<BR><FONT FACE="Courier New,Courier">> of PRO_SET_VALUE and FUNC_GET_VALUE
which are not very well documented. (Nor</FONT>
<BR><FONT FACE="Courier New,Courier">> can I find their use anywhere on
DWF's web page :( Dave seems to prefer</FONT>
<BR><FONT FACE="Courier New,Courier">> using a NotifyID keyword to pass
events and change things.</FONT><FONT FACE="Courier New,Courier"></FONT>
<P><FONT FACE="Courier New,Courier">No, no, no. In fact, these days, ALL
of my compound widgets</FONT>
<BR><FONT FACE="Courier New,Courier">are written as objects. The purpose
of the FUNC_GET_VALUE</FONT>
<BR><FONT FACE="Courier New,Courier">for these objects is to return the
"self" object, which</FONT>
<BR><FONT FACE="Courier New,Courier">I can then control by means of methods.
This makes it</FONT>
<BR><FONT FACE="Courier New,Courier">incredibly easy to manipulate the
internal widgets of</FONT>
<BR><FONT FACE="Courier New,Courier">a compound widget.</FONT><FONT FACE="Courier New,Courier"></FONT>
<P><FONT FACE="Courier New,Courier">I've been meaning to write an example
of this, but most</FONT>
<BR><FONT FACE="Courier New,Courier">of my real programs are too complex
for instructional</FONT>
<BR><FONT FACE="Courier New,Courier">programs, and I haven't had the time
to write a simple,</FONT>
<BR><FONT FACE="Courier New,Courier">but meaningful, example. I promise
to do it, but I really</FONT>
<BR><FONT FACE="Courier New,Courier">can't say when. :-)</FONT><FONT FACE="Courier New,Courier"></FONT>
<P><FONT FACE="Courier New,Courier">Cheers,</FONT><FONT FACE="Courier New,Courier"></FONT>
<P><FONT FACE="Courier New,Courier">David</FONT></BLOCKQUOTE>
<FONT FACE="Courier New,Courier"> Hi,</FONT>
<BR><FONT FACE="Courier New,Courier"> 1) The students are back
so our network is *really* screwed(up)</FONT>
<BR><FONT FACE="Courier New,Courier"> so
double posts may result so apologies in advance.</FONT>
<BR><FONT FACE="Courier New,Courier"> 2) After watching
"South Park" last night I realized that I</FONT>
<BR><FONT FACE="Courier New,Courier"> should
have made the widget do both float and integer, I</FONT>
<BR><FONT FACE="Courier New,Courier"> guess
since SP is in Colorado and David lives in Colorado</FONT>
<BR><FONT FACE="Courier New,Courier"> I made
the connection ... :)</FONT>
<BR><FONT FACE="Courier New,Courier"> 3) The extremely thin
IDL volume on Objects & Graphics led me</FONT>
<BR><FONT FACE="Courier New,Courier"> to
believe that I would be spending far too much time learning</FONT>
<BR><FONT FACE="Courier New,Courier"> Object
Oriented Programming without a net and not getting any</FONT>
<BR><FONT FACE="Courier New,Courier"> work
done. David's statement about "programs are too complex"</FONT>
<BR><FONT FACE="Courier New,Courier"> seems
to justify my delay into OOP.</FONT>
<BR><FONT FACE="Courier New,Courier">Doug</FONT>
<PRE>--
Douglas J. Larson & ;nbsp; e-mail: djl@loki.srl.caltech.edu
Space Radiation Lab
California Institute of Technology
Mail Code: 220-47
Pasadena, CA 91125</PRE>
</HTML>
|
|
|
Re: Source Code: A min/max compound widget [message #12936 is a reply to message #12934] |
Thu, 24 September 1998 00:00  |
davidf
Messages: 2866 Registered: September 1996
|
Senior Member |
|
|
Rose (rmlongfield@my-dejanews.com) writes:
> I am re-visiting the construction of compound widgets, having had not
> so much success a few months ago when first starting widgets. I'll probably
> be studying your program to hopefully get some ideas, in particular, the use
> of PRO_SET_VALUE and FUNC_GET_VALUE which are not very well documented. (Nor
> can I find their use anywhere on DWF's web page :( Dave seems to prefer
> using a NotifyID keyword to pass events and change things.
No, no, no. In fact, these days, ALL of my compound widgets
are written as objects. The purpose of the FUNC_GET_VALUE
for these objects is to return the "self" object, which
I can then control by means of methods. This makes it
incredibly easy to manipulate the internal widgets of
a compound widget.
I've been meaning to write an example of this, but most
of my real programs are too complex for instructional
programs, and I haven't had the time to write a simple,
but meaningful, example. I promise to do it, but I really
can't say when. :-)
Cheers,
David
----------------------------------------------------------
David Fanning, Ph.D.
Fanning Software Consulting
E-Mail: davidf@dfanning.com
Phone: 970-221-0438, Toll-Free Book Orders: 1-888-461-0155
Coyote's Guide to IDL Programming: http://www.dfanning.com/
|
|
|
Re: Source Code: A min/max compound widget [message #12938 is a reply to message #12934] |
Thu, 24 September 1998 00:00  |
rmlongfield
Messages: 68 Registered: August 1998
|
Member |
|
|
In article <36098201.C8C40513@REMOVECAPSloki.srl.caltech.edu>,
Doug Larson <djl@REMOVECAPSloki.srl.caltech.edu> wrote:
> Hi All,
> I just finished a compound widget using sliders for getting the
> minimum
> and maximum of some range. I have included a simple test code at the
> bottom
> of the file for people to see what the widget does.
Hi Doug,
I downloaded your compound widget and it works fine on an SGI IDLv5.0.
I have already something that does a similar thing but in a very inelegant
(unelegant?) and inflexible way. I'll try using your program instead, as it is
written as a CW (and not a bunch of confusing statements which is what I have
now).
I am re-visiting the construction of compound widgets, having had not
so much success a few months ago when first starting widgets. I'll probably
be studying your program to hopefully get some ideas, in particular, the use
of PRO_SET_VALUE and FUNC_GET_VALUE which are not very well documented. (Nor
can I find their use anywhere on DWF's web page :( Dave seems to prefer
using a NotifyID keyword to pass events and change things.
Thanks
Rose
-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum
|
|
|
Re: Source Code: A min/max compound widget [message #13026 is a reply to message #12934] |
Thu, 24 September 1998 00:00  |
davidf
Messages: 2866 Registered: September 1996
|
Senior Member |
|
|
Doug Larson (djl@REMOVECAPSloki.srl.caltech.edu) writes:
> 2) After watching "South Park" last night I realized that I
> should have made the widget do both float and integer.
Don't worry about it. Most of my *really* good programming ideas
come about 10 seconds after I hit the SEND button. :-)
> 3) The extremely thin IDL volume on Objects & Graphics led me
> to believe that I would be spending far too much time learning
> Object Oriented Programming without a net and not getting any
> work done. David's statement about "programs are too complex"
> seems to justify my delay into OOP.
No, no, no. Just the opposite. Object-oriented programming
is so easy that programs get complex just by virtue of
you thinking, "Oh, wouldn't it be neat if..." I find it hard
to STOP writing object programs. There is just no end to the
neat things you can do with them.
Besides, this newsgroup is a good safety net. :-)
Cheers,
David
----------------------------------------------------------
David Fanning, Ph.D.
Fanning Software Consulting
E-Mail: davidf@dfanning.com
Phone: 970-221-0438, Toll-Free Book Orders: 1-888-461-0155
Coyote's Guide to IDL Programming: http://www.dfanning.com/
|
|
|