From: Lorenzo Guerrasio on 6 Mar 2010 11:17 Hi everybody. I'm using the uiimport function into a callback of a GUI (the user access to the menu 'load' of a figure, the callback belong to the menu). In the callback, I store the imported file in a structure, and then I retrieve the name of the variable (I do this, because I want the user to select a specific variable of the file). Everything works fine, but the uiimport is loaded twice: once it load the variable in the workspace, it is loaded again. Any idea of why this happens? Below, my code, if it can be of any help. function [] = fm_call(varargin) fstruct=uiimport; datanames=fieldnames(fstruct); [s,v] = listdlg('PromptString','Select a variable:',... 'SelectionMode','single',... 'ListString',datanames); .... Thanks a lot!
From: Lorenzo Guerrasio on 8 Mar 2010 07:32 No idea? "Lorenzo Guerrasio" <lorenzo.guerrasio(a)email.it> wrote in message <hmtv5u$an4$1(a)fred.mathworks.com>... > Hi everybody. > > I'm using the uiimport function into a callback of a GUI (the user access to the menu 'load' of a figure, the callback belong to the menu). > In the callback, I store the imported file in a structure, and then I retrieve the name of the variable (I do this, because I want the user to select a specific variable of the file). Everything works fine, but the uiimport is loaded twice: once it load the variable in the workspace, it is loaded again. > Any idea of why this happens? Below, my code, if it can be of any help. > > function [] = fm_call(varargin) > fstruct=uiimport; > datanames=fieldnames(fstruct); > [s,v] = listdlg('PromptString','Select a variable:',... > 'SelectionMode','single',... > 'ListString',datanames); > ... > > > Thanks a lot!
|
Pages: 1 Prev: return multiple outputs for function Next: Error loading MatLab R2009a on Mac |