[Date Index] [Thread Index] [Author Index]
Re: FileNameSetter, Dynamic
On Fri, 19 Jun 2009 20:49:14 -0400 (EDT), Scot T. Martin wrote: > 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? I answered exactly this question a few months ago in this post... http://forums.wolfram.com/mathgroup/archive/2009/Feb/msg00424.html Sincerely, John Fultz jfultz at wolfram.com User Interface Group Wolfram Research, Inc.