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