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

Home » Public Forums » archive » Re: What am I doing wrong with al_legend?
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: What am I doing wrong with al_legend? [message #78714 is a reply to message #78713] Tue, 13 December 2011 13:12 Go to previous messageGo to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Brian Wolven writes:

> I think this is a case where the keyword arguments are being passed by reference rather than value, then modified in the legend routine, which propagates back to the calling routine. I'm not using the cg* and al* flavors of these routines, but had something similar happen with an older version of legend recently. Your modification is one way to work around the problem.

I think it really has to do with the fact that keyword
values get "frozen" by necessity when they are added
to cgWindow. This code, for example, worked perfectly
well in a normal IDL graphics window. But, when added to
cgWindow, the PSYM value is frozen at 8, meaning use the
user defined symbol, and because there is *only* one user
defined symbol allowed at any particular time, it uses
the last one.

The work-around is to put any of these "dynamic"
determinations of keyword or parameter values inside
the program "command" that is being executed. That
way the actual value can be determined when the command
is executed from inside cgWindow.

In other words, let AL_LEGEND figure out what symbol
to use internally, rather than telling it what symbol
to use from outside the program.

Or, something like that. It hurts my head to think
about it. :-(

Cheers,

David


--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: Coyote Graphics Updates
Next Topic: idl crash with ps_end and fixps

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

Current Time: Wed Oct 08 19:21:01 PDT 2025

Total time taken to generate the page: 0.00405 seconds