From: Sahra winter on 6 May 2010 18:01 I have 2 GUIDE guis ( a Main gui & a Sub gui) I'm calling a user defined function in the main gui from one of callbacks in the sub gui. this user defined function uses the main gui's handles to produce some out puts. My Problem is: when in this function guidata(hObject, handles) gives an error & handles of Main gui are not recognized (visible) how should address this issue? P.S. I'm calling this user defined function by its handle that i previously made in the opening function of main gui. setappdata(gcf, 'fhRunSS', @RunSS); & I'm calling it in the sub gui: fhRunSS = getappdata(hMainGui, 'fhRunSS'); feval(fhRunSS); thanks
From: Walter Roberson on 6 May 2010 18:56 Sahra winter wrote: > I have 2 GUIDE guis ( a Main gui & a Sub gui) > I'm calling a user defined function in the main gui from one of > callbacks in the sub gui. > this user defined function uses the main gui's handles to produce some > out puts. My Problem is: > when in this function guidata(hObject, handles) gives an error & handles > of Main gui are not recognized (visible) how should address this issue? > P.S. I'm calling this user defined function by its handle that i > previously made in the opening function of main gui. > setappdata(gcf, 'fhRunSS', @RunSS); > > & I'm calling it in the sub gui: > fhRunSS = getappdata(hMainGui, 'fhRunSS'); > feval(fhRunSS); guidata and appdata are stored in different places. Each handle graphic object has guidata, appdata, and userdata.
From: Sahra winter on 6 May 2010 19:18 thanks walter how am I suppose to specify how to see my Main gui's handles( to see guidata of my main gui) while executing this function.
From: Walter Roberson on 6 May 2010 19:23 Sahra winter wrote: > how am I suppose to specify how to see my Main gui's handles( to see > guidata of my main gui) while executing this function. You can use guidata() in other routines, as long as you pass in the figure number of the gui.
From: Sahra winter on 6 May 2010 19:31 I actually did use userdata, but it makes new handles for the gui & does not bring the previously defined handles into focus.!! I want all my main gui's handles to be available to this function. p.s. I used the technique showed in Doug hull's video on multiple window gui, but the thing is that he is not using handles of his main gui in the user defined function, but I need them
|
Next
|
Last
Pages: 1 2 Prev: Very small numbers approximated with 0? Next: Clear current character from figure handle |