| Re: another 7.0 cd issue [message #60993 is a reply to message #60975] |
Tue, 01 July 2008 09:26  |
Vince Hradil
Messages: 574 Registered: December 1999
|
Senior Member |
|
|
On Jun 30, 11:53 am, Wox <nom...@hotmail.com> wrote:
> Ok, so I'm trying IDL7.0. Thanks to this newsgroup I was prepared and
> followed a course on Zen meditation before taking on the big 7.
>
> Everything was going well until I tried to change the current
> directory (with cd,'c:\...'), hoping it would stay like that we I
> execute a widget app. I stripped the widget app (see below). If you
> would compile this and run it, everything goes well, i.e. pressing the
> button will print the path I set. However, if you try to make a
> project out of it (with 1 file) and you would "build + run the
> project", the path printed will not be the one I set.
>
> Any ideas?
>
> Wox
>
> pro test_event,ev
> cd,c=c
> print,'Directory after xmanager: '+c
> end
>
> pro test
> dir='c:\temp\'
> base=WIDGET_BASE(MBAR=bar,/row,title='TEST:',scr_xsize=300,s cr_ysize=100)
> button= widget_button(base,value='check '+dir+' ...')
> cd,dir,c=c
> print,'Initial directory: '+c
> cd,c=c
> print,'Set directory: '+c
> WIDGET_CONTROL, base, /REALIZE
> Xmanager,'test',base,/NO_BLOCK
> end
FWIW, it works fine for me either way.
*** Build Project: 'Default'
*** Compiling files...
*** Compile complete: Time = 1.64s
*** Running build command: resolve_all
*** Build complete: Time = 3.64s
Initial directory: C:\Documents and Settings\hradivp\IDLWorkspace
\Default
Set directory: c:\temp
Directory after xmanager: c:\temp
Directory after xmanager: c:\temp
Directory after xmanager: c:\temp
IDL> print, !version
{ x86 Win32 Windows Microsoft Windows 7.0 Oct 25 2007 32 64}
|
|
|
|