- 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?