From: "Ofek Shilon" <ofek@REMOVETHISananas-music.com>
Path: news.mathworks.com!newsfeed-00.mathworks.com!webcrossing
Newsgroups: comp.soft-sys.matlab
Subject: Re: integrating two gui
Message-ID: <ef48a14.1@webcrossing.raydaftYaTP>
Date: Tue, 2 Jan 2007 12:48:26 -0500
References: <1166119932.782927.245400@n67g2000cwd.googlegroups.com> <1167759270.129428.243310@i12g2000cwa.googlegroups.com>
Lines: 76
NNTP-Posting-Host: 88.155.46.127
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
Xref: news.mathworks.com comp.soft-sys.matlab:385757



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