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

Home » Public Forums » archive » Re: Best way to reset the session?
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: Best way to reset the session? [message #34097] Tue, 18 February 2003 11:22
Steven V. Penton is currently offline  Steven V. Penton
Messages: 5
Registered: February 2003
Junior Member
In <4a097d6a.0302161306.79db1a39@posting.google.com> M. Katz wrote:
> I hope this question has an easy answer.
> When running an IDL session, if I modify the
> structure of an object definition and then recompile
> the something__define.pro, IDL doesn't like that.
> That's understandable.
>
> In IDL 5.4 on Mac OS X, I could simply type
> ..reset_session--the memory of that object
> would be expunged, AND (!) IDL would re-run
> my startup.pro file so I'd have a true, fresh session
> with all of my default parameters set up like new.
>
> I've noticed that in IDL 5.6 (Mac, Linux, Sun) typing
> ..reset or .reset_session starts things anew, but
> doesn't run my startup.pro file. It's now necessary
> to exit and restart IDL.
>
> For those of you working in a unix environment,
> what's the best way to reset AND have your initializations
> run upon doing so?
>
> Thanks,
> M. Katz
>
FYI, that .reset_session haxie was a MAC (Classic) specific ditty
that Thierry put in
Re: Best way to reset the session? [message #34109 is a reply to message #34097] Sun, 16 February 2003 18:16 Go to previous message
Richard French is currently offline  Richard French
Messages: 173
Registered: December 2000
Senior Member
>
> I've bound a macro to run the startup script to a handy key. I use it
> immediately after .reset_session. (I tried a script that would reset the
> session *then* run the startup script. Not surprisingly, this didn't work as
> executive commands cannot be called from scripts.)
>

If you use an '@' file, I think you can get it to work:

I have a file, 'myreset.pro' that contains

; myreset.pro
; execute this by typing
; @myreset.pro
;
.reset_session
@idl.startup


And then I can do a full reset by typing

@myreset

Is this what you are after?

Dick French
Re: Best way to reset the session? [message #34111 is a reply to message #34109] Sun, 16 February 2003 14:57 Go to previous message
Mark Hadfield is currently offline  Mark Hadfield
Messages: 783
Registered: May 1995
Senior Member
"M. Katz" <MKatz843@onebox.com> wrote in message
news:4a097d6a.0302161306.79db1a39@posting.google.com...
> ...
> In IDL 5.4 on Mac OS X, I could simply type
> .reset_session--the memory of that object
> would be expunged, AND (!) IDL would re-run
> my startup.pro file so I'd have a true, fresh session
> with all of my default parameters set up like new.

That's funny. In IDL 5.4 (and later) on Windows the startup file is not
re-run.

> I've noticed that in IDL 5.6 (Mac, Linux, Sun) typing
> .reset or .reset_session starts things anew, but
> doesn't run my startup.pro file. It's now necessary
> to exit and restart IDL.

Er...you could run the startup file yourself.

I've bound a macro to run the startup script to a handy key. I use it
immediately after .reset_session. (I tried a script that would reset the
session *then* run the startup script. Not surprisingly, this didn't work as
executive commands cannot be called from scripts.)

--
Mark Hadfield "Ka puwaha te tai nei, Hoea tatou"
m.hadfield@niwa.co.nz
National Institute for Water and Atmospheric Research (NIWA)
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: UNIQ without SORT
Next Topic: WHERE approaching Flatland

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

Current Time: Wed Oct 08 11:45:37 PDT 2025

Total time taken to generate the page: 0.00577 seconds