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

Home » Public Forums » archive » Re: cgArrow Solid keyword with a cgWindow
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: cgArrow Solid keyword with a cgWindow [message #83922 is a reply to message #83921] Thu, 18 April 2013 08:34 Go to previous messageGo to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Fabien writes:

> By the way, what are the rules for this? Do all routines have an /ADDCMD
> but not all routines have a /WINDOW? Could one of the two be suppressed?

The rational for having two keywords that do the same thing is that when
you get so excited about a great new idea, you sometimes start coding
before you really understand what the hell it is you are doing. This is
the unfortunate, messy result.

Originally, I thought a single WINDOW keyword would work great. You set
the WINDOW keyword, the command gets added to the resizeable graphics
window. What could be simpler?

But, then I realized I wanted the graphics commands to act like
"normal" graphics commands. If I do a line plot, I see a line plot. If I
then do a contour plot, the contour plot shows up in the same window as
the previous line plot, and so on. So, I changed the meaning of WINDOW
to mean "get rid of all the other commands in this window and add this
command to the window". That required the ADDCMD keyword for things I
wanted to "add" to commands that were already in the window.

Then, of course, you could replace commands, etc. I saw the keyword list
rapidly getting completely out of control. So I decided only two
keywords, WINDOW and ADDCMD. "WINDOW" more or less means "start over
with this command as the first command in the window". ADDCMD more or
less means "add this command to the list of commands that already exist
in the window". But, life is complicated, and it is not always so easy
to sort out the details.

Consider something like cgArrow. Has anyone anywhere ever drawn an arrow
in a graphics window without anything else around? Probably not. So, in
this case WINDOW probably should mean ADDCMD 99% of the time. But, as
soon as I make a decision like that, somebody sends me an e-mail
complaining that they just want a damn arrow in a graphics window! Sigh.

So, I'm just saying it's complicated. I do my best. ;-)

Cheers,

David


--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thue. ("Perhaps thou speakest truth.")
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: How to Zip cross-platform from IDL?
Next Topic: Re: issue with CMSAVE

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

Current Time: Fri Oct 10 08:07:05 PDT 2025

Total time taken to generate the page: 0.00611 seconds