<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/254215</link>
    <title>MATLAB Central Newsreader - gui .m file referencing functions in older version instead of own</title>
    <description>Feed for thread: gui .m file referencing functions in older version instead of own</description>
    <language>en-us</language>
    <copyright>&amp;copy;1994-2012 by MathWorks, Inc.</copyright>
    <webmaster>webmaster@mathworks.com</webmaster>
    <generator>MATLAB Central Newsreader</generator>
    <docs>http://blogs.law.harvard.edu/tech/rss</docs>
    <ttl>60</ttl>
    <image>
      <title>MathWorks</title>
      <url>http://www.mathworks.com/images/membrane_icon.gif</url>
    </image>
    <item>
      <pubDate>Sat, 20 Jun 2009 11:09:02 -0400</pubDate>
      <title>gui .m file referencing functions in older version instead of own</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/254215#658960</link>
      <author>scott </author>
      <description>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.&lt;br&gt;
&lt;br&gt;
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?&lt;br&gt;
Thanks,&lt;br&gt;
Scott&lt;br&gt;
&lt;br&gt;
version: 2007b&lt;br&gt;
os: win</description>
    </item>
    <item>
      <pubDate>Sat, 20 Jun 2009 11:33:01 -0400</pubDate>
      <title>Re: gui .m file referencing functions in older version instead of own</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/254215#658961</link>
      <author>Bruno Luong</author>
      <description>&quot;scott&quot; &amp;lt;grenblau@yahoo.deletethis.com&amp;gt; wrote in message &amp;lt;h1ig0e$s6k$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; 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.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; 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?&lt;br&gt;
&amp;gt; Thanks,&lt;br&gt;
&amp;gt; Scott&lt;br&gt;
&lt;br&gt;
The &quot;cause&quot; 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 &quot;revise&quot; a GUI file, whatever &quot;revise&quot; mean.&lt;br&gt;
&lt;br&gt;
Bruni</description>
    </item>
    <item>
      <pubDate>Sat, 20 Jun 2009 17:54:15 -0400</pubDate>
      <title>Re: gui .m file referencing functions in older version instead of own</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/254215#658999</link>
      <author>Nathan</author>
      <description>On Jun 20, 4:09&#160;am, &quot;scott&quot; &amp;lt;grenb...@yahoo.deletethis.com&amp;gt; wrote:&lt;br&gt;
&amp;gt; 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). &#160;However, when I run mygui2, instead of calling its own functions, it calls functions from mygui (which are called the same thing). &#160;For some reason, it is not giving its own namespace priority. &#160;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.&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; 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?&lt;br&gt;
&amp;gt; Thanks,&lt;br&gt;
&amp;gt; Scott&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; version: 2007b&lt;br&gt;
&amp;gt; os: win&lt;br&gt;
&lt;br&gt;
What you would want to do instead is save the .fig file as mygui2, it&lt;br&gt;
will automatically name the new .m file accordingly and fix and&lt;br&gt;
linking issues.&lt;br&gt;
This has happened to me too, and that's what solved it.&lt;br&gt;
Good luck&lt;br&gt;
-Nathan</description>
    </item>
    <item>
      <pubDate>Mon, 22 Jun 2009 03:50:01 -0400</pubDate>
      <title>Re: gui .m file referencing functions in older version instead of own</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/254215#659218</link>
      <author>scott </author>
      <description>Nathan &amp;lt;ngreco32@gmail.com&amp;gt; wrote in message &amp;lt;0ad1b602-3b0b-4d4a-b819-d30be043ae1b@y10g2000prc.googlegroups.com&amp;gt;...&lt;br&gt;
&amp;gt; On Jun 20, 4:09?am, &quot;scott&quot; &amp;lt;grenb...@yahoo.deletethis.com&amp;gt; wrote:&lt;br&gt;
&amp;gt; &amp;gt; 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.&lt;br&gt;
&amp;gt; &amp;gt;&lt;br&gt;
&amp;gt; &amp;gt; 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?&lt;br&gt;
&amp;gt; &amp;gt; Thanks,&lt;br&gt;
&amp;gt; &amp;gt; Scott&lt;br&gt;
&amp;gt; &amp;gt;&lt;br&gt;
&amp;gt; &amp;gt; version: 2007b&lt;br&gt;
&amp;gt; &amp;gt; os: win&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; What you would want to do instead is save the .fig file as mygui2, it&lt;br&gt;
&amp;gt; will automatically name the new .m file accordingly and fix and&lt;br&gt;
&amp;gt; linking issues.&lt;br&gt;
&amp;gt; This has happened to me too, and that's what solved it.&lt;br&gt;
&amp;gt; Good luck&lt;br&gt;
&amp;gt; -Nathan&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
Thanks for your suggestion.  I did this, but am still getting the problem.  </description>
    </item>
    <item>
      <pubDate>Mon, 22 Jun 2009 03:57:00 -0400</pubDate>
      <title>Re: gui .m file referencing functions in older version instead of own</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/254215#659219</link>
      <author>scott </author>
      <description>For example, here is an error message from the following situation.&lt;br&gt;
&lt;br&gt;
I had a .fig file named fixSpotCalls.fig&lt;br&gt;
I generated fixSpotCalls.m from it.&lt;br&gt;
I edited fixSpotCalls.fig to fixSpotCallsRFOnly.fig and generated a new .m file called fixSpotCallsRFOnly.m&lt;br&gt;
&lt;br&gt;
Then I ran fixSpotCallsRFOnly and here is the error messasge when trying to create one of the ui controls.  &lt;br&gt;
&lt;br&gt;
---------------&lt;br&gt;
q=fixSpotCallsRFOnly('tmr','001',w);&lt;br&gt;
??? Undefined function or method 'fixSpotCalls' for input arguments of type 'char'.&lt;br&gt;
&lt;br&gt;
Error in ==&amp;gt; @(hObject,eventdata)fixSpotCalls('spotContextSlider_CreateFcn',hObject,eventdata,guidata(hObject))&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
??? Error using ==&amp;gt; struct2handle&lt;br&gt;
Error while evaluating uicontrol CreateFcn&lt;br&gt;
-------------------------&lt;br&gt;
In the properties for this uicontrol, however, I have the following under createfcn:&lt;br&gt;
&lt;br&gt;
fixSpotCallsRFOnly('spotContextSlider_CreateFcn',gcbo,[],guidata(gcbo))&lt;br&gt;
&lt;br&gt;
which is correct.&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
Thanks,&lt;br&gt;
Scott</description>
    </item>
    <item>
      <pubDate>Mon, 22 Jun 2009 03:59:03 -0400</pubDate>
      <title>Re: gui .m file referencing functions in older version instead of own</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/254215#659221</link>
      <author>scott </author>
      <description>One more thing I forgot to mention.  The reason it gave me an error in createfcn is because I renamed the old fixSpotCalls.fig and fixSpotCalls.m files to something else so that they could no longer be found.  This exposed the embedded dependence upon those files in my new fixSpotCallsRFOnly.m/fig files</description>
    </item>
    <item>
      <pubDate>Mon, 22 Jun 2009 06:19:01 -0400</pubDate>
      <title>Re: gui .m file referencing functions in older version instead of own</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/254215#659237</link>
      <author>Bruno Luong</author>
      <description>&quot;scott&quot; &amp;lt;grenblau@yahoo.deletethis.com&amp;gt; wrote in message &amp;lt;h1mvi7$bk$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; One more thing I forgot to mention.  The reason it gave me an error in createfcn is because I renamed the old fixSpotCalls.fig and fixSpotCalls.m files to something else so that they could no longer be found.  This exposed the embedded dependence upon those files in my new fixSpotCallsRFOnly.m/fig files&lt;br&gt;
&lt;br&gt;
Take a look of the CALLBACK in your fig, as we suggested.&lt;br&gt;
&lt;br&gt;
Bruno</description>
    </item>
  </channel>
</rss>

