Thread Subject: rename gui

Subject: rename gui

From: Rik-Jan Lemmen

Date: 11 Jul, 2008 09:04:04

Message: 1 of 3

I just renamed a gui file by using save as in guide, but
after that I get all kind of warnings in the matlab output
window with the old file name.

the warnings are:

??? Error using ==> struct2handle
Undefined function or method 'DIC_gui' for input arguments
of type 'char'.

??? Error using ==> struct2handle
Error while evaluating uicontrol CreateFcn

the old name of hte gui file was DIC_gui.

can anybody tell me whether it is possible to get rid of
those warnings?

Thanks!
 

Subject: rename gui

From: roberson@ibd.nrc-cnrc.gc.ca (Walter Roberson)

Date: 11 Jul, 2008 12:33:49

Message: 2 of 3

In article <g577m4$1ud$1@fred.mathworks.com>,
Rik-Jan Lemmen <H.J.K.Lemmen@gmail.com> wrote:
>I just renamed a gui file by using save as in guide, but
>after that I get all kind of warnings in the matlab output
>window with the old file name.

>the warnings are:

>??? Error using ==> struct2handle
>Undefined function or method 'DIC_gui' for input arguments
>of type 'char'.

>the old name of hte gui file was DIC_gui.

>can anybody tell me whether it is possible to get rid of
>those warnings?

Yes, you can use
  warning('off');

However, your gui will not work.

GUIDE generates routines which have a prefix which is the name
of the GUI. Unless you go in with an editor and rename all of
those routines and all the references to them, (and rename generated
files too if necessary) you will have problems with the renamed GUI.

The moral of the story is, "Don't do that!" -- don't rename a GUIDE
GUI by using "save as".
--
  "He wove a great web of knowledge, linking everything together,
  and sat modestly at a switchboard at the center, eager to help."
                                              -- Walter Kerr

Subject: rename gui

From: Lars

Date: 11 Jul, 2008 12:48:02

Message: 3 of 3

In my opinion you can open 'gui1.fig' in guide and save it
as 'gui2.fig' using 'save as'. Then, as far as I know,
guide will create a new *.fig-file and a corresponding *.m -
file. You cannot just save the 'gui1.m' as 'gui2.m'.
Lars

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

Public Submission Policy

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 Disclaimer prior to use.

Contact us at files@mathworks.com