Path: news.mathworks.com!not-for-mail
From: "Steven Lord" <slord@mathworks.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: error"Attempt to reference field of non-structure array"
Date: Thu, 5 Jun 2008 09:54:27 -0400
Organization: The MathWorks, Inc.
Lines: 20
Message-ID: <g28r6k$b3o$1@fred.mathworks.com>
References: <g27ddf$2gn$1@fred.mathworks.com>
Reply-To: "Steven Lord" <slord@mathworks.com>
NNTP-Posting-Host: lords.dhcp.mathworks.com
X-Trace: fred.mathworks.com 1212674068 11384 144.212.105.187 (5 Jun 2008 13:54:28 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Thu, 5 Jun 2008 13:54:28 +0000 (UTC)
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.3138
X-RFC2646: Format=Flowed; Original
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3198
Xref: news.mathworks.com comp.soft-sys.matlab:472358




"lichao qi" <qilichao1106@126.com> wrote in message 
news:g27ddf$2gn$1@fred.mathworks.com...
> when i open a finished gui .fig file with the guide,it is
> ok.However the error happen once i double click it.do
> anybody know why?

There are two pieces to a GUI generated by GUIDE -- the FIG-file and the 
M-file.  You should run your GUI by running the M-file -- it does some setup 
then opens the FIG-file.  When you open the FIG-file directly by 
double-clicking on it in the Current Directory browser (which is where I 
assume you double-clicked it) you open the FIG-file without doing the 
M-file's setup first, and I'm pretty sure that's what causes the error you 
described.

-- 
Steve Lord
slord@mathworks.com