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

Home » Public Forums » archive » Re: FSC_PLOT defaults
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: FSC_PLOT defaults [message #74136 is a reply to message #74135] Tue, 21 December 2010 09:53 Go to previous messageGo to previous message
ben.bighair is currently offline  ben.bighair
Messages: 221
Registered: April 2007
Senior Member
On 12/20/10 9:03 PM, Paulo Penteado wrote:


Hi,

> One of the main reasons I do not use object graphics is their reliance
> on global variables - especially those that do not get reset with
> a .reset_session. I usually object to global variables on any
> situation, as they make the results dependent on the environment, not
> just the code the user writes / receives (and, particularly, dependent
> not just on the routine calls).

I see what you mean. I wonder if this is a case we can resolve that
automatically - have the FSC_Defaults function check for the system
variable !FSC_Defaults and if it isn't there then load it. I can't
imagine that it adds much to overhead except the first time it is called
each session.


Function FSC_Default, what, value, SET = set, _REF_EXTRA = extra

DEFSYSV, "!FSC_Default", EXISTS = ok
IF (~ok) THEN BEGIN
RESTORE, <path-to-FSC_Defaults.pref>, RESTORED_OBJECTS = objs
DEFSYSV, "!FSC_Default", objs[1]
ENDIF

IF (KEYWORD_SET(set)) THEN $
return, !FSC_Default->Set(what, value, _EXTRA = extra) ELSE $
return, !FSC_Default->Get(what, _EXTRA = extra)

END;


> Also, it is awkward to use
> simultaneous instances of things that rely on (the same) global
> variables.

I'm a little fuzzy on this. How might this occur?

Cheers,
Ben

P.S. Isn't it grand thinking up things for David to do? Puts me in the
holiday spirit!
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
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: updating the coyote library
Next Topic: Re: Hodograph plots of wind speed and direction

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

Current Time: Wed Oct 08 22:44:05 PDT 2025

Total time taken to generate the page: 2.08093 seconds