Mathematica 9 is now available
Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2009

[Date Index] [Thread Index] [Author Index]

Search the Archive

Problem using a dialog and dynamic

  • To: mathgroup at smc.vnet.net
  • Subject: [mg97795] Problem using a dialog and dynamic
  • From: "Paul Ellsmore" <paul.ellsmore at nanion.co.uk>
  • Date: Sun, 22 Mar 2009 05:45:47 -0500 (EST)

Hi,

 

The following code should show a button 

and a text field. When I click the button, i should get 

a system dialog allowing me to select a folder, and the 

folder's file and pathname should then be displayed in 

the text field.

 

Hi,

 

The following code should show a button and a text field. When I click the
button, i should get a system dialog allowing me to select a folder, and the
folder's file and pathname should then be displayed in the text field.

 

Panel[Grid[{{Button["Select/Change Project
Directory",sourcedir=SystemDialogInput["Directory","C:\\"]]},{Column[{"Curre
nt Project Directory:",InputField[Dynamic[sourcedir],String]}]}}]]

 

Unfortunately, the performance is erratic!

 

If I click the button, then select a folder of the C drive, say C:\first,
and click "open", the textfield display C:\first as expected. But if I then
click the button again, and select, say, folder off the C:\first\second and
click "open", the textfield does not change, nor does it for any subsequent
clicks. However, if I select the desktop, it works as expected, and if I
select the C: drive again it also works.

 

To summarise, if i want to change the folder selection, I have to select the
C: drive once, then click again and select the subfolder I want, and if I
want to change the subfolder, I have to select the c: drive again, before I
can select the new subfolder.

 

Is this a bug, or am I doing something stupid? I am using V7 on Windows
Vista Home Premium.

 

Thanks in advance,

 

Paul

 

Dr. Paul A. Ellsmore

 

Nanion Limited

Oxford Centre for Innovation

Mill Street

Oxford

United Kingdom

OX2 0JX

 

Tel: +44 (0) 1865 811175

Fax: +44 (0) 1865 248594



  • Prev by Date: Re: Wolfram WorkBench and iDisk
  • Next by Date: Re: Using findroot and NIntegrate with a double integral
  • Previous by thread: Re: Help plotting P(x,y,z) = Aexp[r^2]
  • Next by thread: Re: Problem using a dialog and dynamic