Date: Jun 23, 2013 9:36 PM
Author: Nasser Abbasi
Subject: Re: pass a value from a GUI to another

On 6/23/2013 7:22 PM, yang wrote:
> On a GUI, I have:
> 1. a 'Edit Text' space for input a certain value;
> 2. a 'Pushbutton' to shows the input value.
>
> My code (only show the relevant parts):
> function edit1_Callback(hObject, eventdata, handles)
> setappdata(0,'A',get(hObject.edit1,'value'));
>
> function pushbutton1_Callback(hObject, eventdata, handles)
> a= getappdata(0,'A')
>
> When I press the pushbotton, why it didn't show the input value, but a '[]'?
> Please correct the code if possible. I only want to get it run.
>


why are you using 0 for object handle?