Re: FileNameSetter[], Dynamic[]
- To: mathgroup at smc.vnet.net
- Subject: [mg101015] Re: [mg101001] FileNameSetter[], Dynamic[]
- From: John Fultz <jfultz at wolfram.com>
- Date: Sun, 21 Jun 2009 07:04:03 -0400 (EDT)
- Reply-to: jfultz at wolfram.com
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.