Path: news.mathworks.com!not-for-mail
From: "G.A.M. " <x0zero@gmail.com>
Newsgroups: comp.soft-sys.matlab
Subject: GUI question - don't want rmappdata called, but don't want to use uiwait
Date: Mon, 27 Aug 2007 18:00:46 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 24
Message-ID: <fav3ge$au7$1@fred.mathworks.com>
Reply-To: "G.A.M. " <x0zero@gmail.com>
NNTP-Posting-Host: webapp-02-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1188237646 11207 172.30.248.37 (27 Aug 2007 18:00:46 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Mon, 27 Aug 2007 18:00:46 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1030060
Xref: news.mathworks.com comp.soft-sys.matlab:425787


I am writing an application with multiple windows. I want
the main window to open first. Then I want the user to be
able to interact with this main window (via uicontrols). I
want plots to be drawn in this main window, etc. Sometimes
dialogs and other windows will be opened, but the main
window should always remain open. I think this is the
default behavior...

When I try to run my program, the figure's OpeningFcn is
called, initialize_gui is called, the main gui window is
created and displayed and my uicontrols work. But, rmappdata
in gui_mainfcn is immediately called and the handle to my
main window is removed at that point. When my m-files call
findobj('Tag', 'tag_my_main_window') the resulting handle is
empty. When I execute h = findobj in the workspace, my main
window and all its controls are not among the handles returned. 

My code fails because it cannot obtain a handle to my main
window for plotting or anything else.

Does anyone have an idea where I'm going wrong? This is in
r2007a.

Thank you