Path: news.mathworks.com!not-for-mail
From: "William " <w_king10@yahoo.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Passing handles between GUIs via a loaded file
Date: Tue, 7 Oct 2008 03:32:01 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 29
Message-ID: <gcel7h$stl$1@fred.mathworks.com>
References: <gccc79$d4l$1@fred.mathworks.com> <gcd447$qmp$1@fred.mathworks.com>
Reply-To: "William " <w_king10@yahoo.com>
NNTP-Posting-Host: webapp-05-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1223350321 29621 172.30.248.35 (7 Oct 2008 03:32:01 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Tue, 7 Oct 2008 03:32:01 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 930703
Xref: news.mathworks.com comp.soft-sys.matlab:493943


Hi Steve,

Thanks for the quick reply!  Am I correct in thinking that the way to save the entire handles structure of a pop-up menu is with:

myStruct.popupmenu1 = get(handles.popupmenu1);

I have now saved each handles structure for all of the components of my GUI.  The problem I am seeing now, is that when I use the command:

set(handles.popupmenu1,myStruct.popupmenu1);

I get the following error:

Error using ==> set
Attempt to modify read-only uicontrol property: 'BeingDeleted'.

Is there something I need to disable to be able to copy the entire handles structure for each GUI component?

I also want to add that during the opening function of my main GUI, I copy the entire handles structure into a new structure called hFig_main (hFig_main = handles;).  I have two other GUIs which work along this one and they use the handles structures hFig_plot and hFig_output.  In my main GUI, the code above is actually:

myStruct.popupmenu1 = get(hFig_main.popupmenu1); and
set(hFig_main.popupmenu1,myStruct.popupmenu1);

Will this cause additional issues with copying the handles from each component.  My initial assumption is that it shouldn't cause issues.  I have been wrong many times before, however!

Thanks again for your help!!

Respectfully,
Bill King