Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
Help needed in passing data between different GUI

Subject: Help needed in passing data between different GUI

From: Yousuf Siddiqui

Date: 9 Sep, 2007 21:28:39

Message: 1 of 1

What I want to build is a GUI transfer data project. In it
one gui file, named transferdata, has an edit box and a
push button. The second gui file named, slidervalue,
contains only a slider.
 
What I want to do is this. First, the user open the
transferdata file and pushes the pushbutton to open the
slidervalue file. Then the user slides the slider to change
its value. The changed value must appear in the edit box in
the transferdata file.
 
Here is the code I wrote under the following callbacks
 
In the transferdata.m file
under edit1 callback
 
newvalue=getappdata(0,'v');
set(handles.edit1,'String',num2str(newvalue));
 
under pushbutton1 callback
 
slidervalue;
 
 
 
In the slidervalue.m file
under slider1 callback
 
value=get(hObject,'Value');
setappdata(0,' v ',value);
 

However When I run the simulation It neither gives me an
error nor show any changes in the edit box.
 
I will highly appreciate if you can tell me what I am doing
wrong.

Tags for this Thread

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us