MathGroup Archive 2009

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

Search the Archive

FileNameSetter[], Dynamic[]

  • To: mathgroup at smc.vnet.net
  • Subject: [mg101001] FileNameSetter[], Dynamic[]
  • From: "Scot T. Martin" <smartin at login.deas.harvard.edu>
  • Date: Fri, 19 Jun 2009 20:49:14 -0400 (EDT)

My objective is to make an interface that allows a user to select a file 
and then that file will be opened by Mathematica and actions (i.e., data 
processing) will be taken. If the user changes the file selection, all 
actions will be repeated on new file.

Here's what I have tried:

FileNameSetter[Dynamic[filename], "Open"]

data = Dynamic[Import[filename, "Byte"]]

The Notebook indeed displays the updated data as a cell, yet other actions 
don't work, e.g., Length[data] always returns 1 and FullForm[data] shows 
Dynamic[Import[filename,"Byte"]].

Am I approaching this problem incorrectly?






  • Prev by Date: expression form
  • Next by Date: Re: weird escaping problem with StringPattern inside
  • Previous by thread: expression form
  • Next by thread: Re: FileNameSetter[], Dynamic[]