Thread Subject: integrating two gui

Subject: integrating two gui

From: siva

Date: 14 Dec, 2006 10:12:12

Message: 1 of 3

hi i have some problem with matlab gui

i created gui with many text boxes that are used to get user datas like

name ,address etc and when the user pushes the push button it connects
tothe ms access database and loads the data in to the database.i have
two submenus in this gui called getdata and delete....


once i click getdata a new figure window will open(this is the second
gui i created with one text box and one push button)once the user click

the push button it, get the data entered by the user in the editbox(2nd
gui) and should connect to the databse.....but i am getting
error like


"Error in =3D=3D> untitled2>submit_Callback at 84
usrdata=3Dget(handles.dataretrieve,'string');


Error in =3D=3D> <a
href=3D"error:C:\MATLAB7\toolbox\matlab\uitools\gui_mainfcn.m,75,1">gui_mai=
nf=ADcn

at 75</a>
        feval(varargin{:});


Error in =3D=3D> untitled2 at 44
    gui_mainfcn(gui_State, varargin{:});


??? Error while evaluating uicontrol Callback."


but if run the second gui alone it works fine and i am able to retrieve

the datas from the database ..but if open the second gui through the
first gui and when i click the push button in the second gui it
shows the error shown above..i open the second gui by using openfig(my
second gui name) in the sub menu editor callback in the first gui
please help me out this.....

Subject: integrating two gui

From: siva

Date: 2 Jan, 2007 09:34:30

Message: 2 of 3



On Dec 14 2006, 1:12 pm, "siva" <saachins...@gmail.com> wrote:
> hi i have some problem with matlab gui
>
> i created gui with many text boxes that are used to get user datas like
>
> name ,address etc and when the user pushes the push button it connects
> tothe ms access database and loads the data in to the database.i have
> two submenus in this gui called getdata and delete....
>
> once i click getdata a new figure window will open(this is the second
> gui i created with one text box and one push button)once the user click
>
> the push button it, get the data entered by the user in the editbox(2nd
> gui) and should connect to the databse.....but i am getting
> error like
>
> "Error in =3D=3D> untitled2>submit_Callback at 84
> usrdata=3Dget(handles.dataretrieve,'string');
>
> Error in =3D=3D> <a
> href=3D"error:C:\MATLAB7\toolbox\matlab\uitools\gui_mainfcn.m,75,1">gui_m=
ainf=ADcn
>
> at 75</a>
> feval(varargin{:});
>
> Error in =3D=3D> untitled2 at 44
> gui_mainfcn(gui_State, varargin{:});
>
> ??? Error while evaluating uicontrol Callback."
>
> but if run the second gui alone it works fine and i am able to retrieve
>
> the datas from the database ..but if open the second gui through the
> first gui and when i click the push button in the second gui it
> shows the error shown above..i open the second gui by using openfig(my
> second gui name) in the sub menu editor callback in the first gui
> please help me out this.....

Subject: integrating two gui

From: Ofek Shilon

Date: 2 Jan, 2007 12:48:26

Message: 3 of 3

You're probably using GUIDE-generated-guis (or you prefer to use the
'handles' struct mechanism in your private code). I whole-heartedly
recommend avoiding this facility, specifically in multi-gui
scenarios. It makes heavy use of global data (setappdata, getappdata
etc), and practically begs for clashes between two simultaneous GUIS.

Have a peek at Doug's example at <http://www.mathworks.com/matlabcentral/fileexchange/loadFile.do?objectId=8616&objectType=FILE>
.

Sorry,

Ofek

 siva wrote:
>
>
>
>
> On Dec 14 2006, 1:12 pm, "siva" <saachins...@gmail.com>
wrote:
>> hi i have some problem with matlab gui
>>
>> i created gui with many text boxes that are used to get user
> datas like
>>
>> name ,address etc and when the user pushes the push button it
> connects
>> tothe ms access database and loads the data in to the
database.i
> have
>> two submenus in this gui called getdata and delete....
>>
>> once i click getdata a new figure window will open(this is the
> second
>> gui i created with one text box and one push button)once the
user
> click
>>
>> the push button it, get the data entered by the user in the
> editbox(2nd
>> gui) and should connect to the databse.....but i am getting
>> error like
>>
>> "Error in ==> untitled2>submit_Callback at 84
>> usrdata=get(handles.dataretrieve,'string');
>>
>> Error in ==> <a
>>
>
href="error:C:\MATLAB7\toolbox\matlab\uitools\gui_mainfcn.m,75,1">g
u
> i_mainf­cn
>>
>> at 75</a>
>> feval(varargin{:});
>>
>> Error in ==> untitled2 at 44
>> gui_mainfcn(gui_State, varargin{:});
>>
>> ??? Error while evaluating uicontrol Callback."
>>
>> but if run the second gui alone it works fine and i am able to
> retrieve
>>
>> the datas from the database ..but if open the second gui
through
> the
>> first gui and when i click the push button in the second gui it
>> shows the error shown above..i open the second gui by using
> openfig(my
>> second gui name) in the sub menu editor callback in the first
gui
>> please help me out this.....
>
>

Tags for this Thread

Add a New Tag:

Separated by commas
Ex.: root locus, bode

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.

rssFeed for this Thread
 

MATLAB Central Terms of Use

NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content. Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available via MATLAB Central. Read the complete Terms prior to use.

Contact us at files@mathworks.com