Error with parsing data from one window to another in app designer
Show older comments
Hello All,
Ik keep having the error "Unable to use a value of type Analyzer as an index.". Even though Analyzer is not a Variable or Function it is the name of my MainApp. I would like to snd data from one window to another and thought I had done all correct and now I get this error but I don't kno wwhere to look anymore cause I dont understand this has something to do with indexing. So Ill show my code below and maybe someone could point me out what I do wrong.
First some properties which I have in the MainApp called "Analyzer
properties (Access = private)
frmPreferences;
X1; %X1 = raw selected data from Load data class
X2;
Y1; %Y1 = raw selected data from Load data class
Y2; %Y2 = raw selected data from Load data class
YBprocessed;
YRprocessed;
Xprocessed;
StartSample;
EndSample;
SampleFrequency;
FileName;
CallData;
end
Then When I would press on the menubar the option "Preferences" I want another window opens. In this case it sends from the main window to the Preference Window a number (SampleFrequency). This is for testing purposes
function PreferencesMenuSelected(app, event)
t = num2str(app.SampleFrequency);
app.frmPreferences = app.frmPreferences(app, t);
end
Next the code in the second window called "frmPreferences" with its properties
properties (Access = private)
Callingapp;
end
And the code when the window get opened:
function startupFcn(app, Analyzer, DatafrmAnalyzer)
app.Callingapp = Analyzer;
app.lblSampleFreq.Text = DatafrmAnalyzer;
end
I have also tried to rename Analyzer but this dont make any differences. So I hope someone can help me a bit.
Thanks in advance
Accepted Answer
More Answers (0)
Categories
Find more on Data Import and Analysis in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!