Path: news.mathworks.com!not-for-mail
From: "Bruno Luong" <b.luong@fogale.findmycountry>
Newsgroups: comp.soft-sys.matlab
Subject: Re: gui .m file referencing functions in older version instead of own
Date: Sat, 20 Jun 2009 11:33:01 +0000 (UTC)
Organization: FOGALE nanotech
Lines: 10
Message-ID: <h1ihdd$pag$1@fred.mathworks.com>
References: <h1ig0e$s6k$1@fred.mathworks.com>
Reply-To: "Bruno Luong" <b.luong@fogale.findmycountry>
NNTP-Posting-Host: webapp-03-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1245497581 25936 172.30.248.38 (20 Jun 2009 11:33:01 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Sat, 20 Jun 2009 11:33:01 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 390839
Xref: news.mathworks.com comp.soft-sys.matlab:549125


"scott" <grenblau@yahoo.deletethis.com> wrote in message <h1ig0e$s6k$1@fred.mathworks.com>...
> I made a gui using guide (call it mygui with .m file mygui.m) and then revised it and called it mygui2 (with .m file mygui2.m).  However, when I run mygui2, instead of calling its own functions, it calls functions from mygui (which are called the same thing).  For some reason, it is not giving its own namespace priority.  I don't have much experience putting multiple functions in a single .m file, so I don't know whether this is just what matlab does, but it would seem intuitive to give the functions in one's own .m file priority.
> 
> Other than the easy but annoying fix of naming all the functions differently (although I haven't tried this to make sure it would work), is there anything else to be done?
> Thanks,
> Scott

The "cause" probably does not lie on your mfile but the associated fig file. Each graphic object has its own callback property and probably they are still refering to the inner function of mygui(). It's usually not recommend to "revise" a GUI file, whatever "revise" mean.

Bruni