<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/172734</link>
    <title>MATLAB Central Newsreader - go to next function in one callback?</title>
    <description>Feed for thread: go to next function in one callback?</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>Thu, 17 Jul 2008 10:19:02 -0400</pubDate>
      <title>go to next function in one callback?</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/172734#443584</link>
      <author>ching l</author>
      <description>In Gui, how do I command the callback function to go to the&lt;br&gt;
next function?&lt;br&gt;
&lt;br&gt;
For example, when I first press the button, it will go to this, &lt;br&gt;
&lt;br&gt;
&lt;br&gt;
function answer_faster_Callback(hObject, eventdata, handles)&lt;br&gt;
csvwrite('subject1.dat',[1;00;55]);&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
then when I press again, it will go to this, &lt;br&gt;
&lt;br&gt;
csvwrite('subject2.dat',[3;5;6]);&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
Possible to do that?&lt;br&gt;
&lt;br&gt;
Thanks.</description>
    </item>
    <item>
      <pubDate>Thu, 17 Jul 2008 13:53:02 -0400</pubDate>
      <title>Re: go to next function in one callback?</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/172734#443625</link>
      <author>David </author>
      <description>&quot;ching l&quot; &amp;lt;chinglnc@hotmail.com&amp;gt; wrote in message &lt;br&gt;
&amp;lt;g5n6am$78p$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; In Gui, how do I command the callback function to go to &lt;br&gt;
the&lt;br&gt;
&amp;gt; next function?&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; For example, when I first press the button, it will go &lt;br&gt;
to this, &lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; function answer_faster_Callback(hObject, eventdata, &lt;br&gt;
handles)&lt;br&gt;
&amp;gt; csvwrite('subject1.dat',[1;00;55]);&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; then when I press again, it will go to this, &lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; csvwrite('subject2.dat',[3;5;6]);&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Possible to do that?&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Thanks.&lt;br&gt;
&lt;br&gt;
yes, just save where you ere in the handles or a global &lt;br&gt;
variable and do the next thing each time.</description>
    </item>
    <item>
      <pubDate>Thu, 17 Jul 2008 14:18:02 -0400</pubDate>
      <title>Re: go to next function in one callback?</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/172734#443636</link>
      <author>ching l</author>
      <description>&amp;gt; yes, just save where you ere in the handles or a global &lt;br&gt;
&amp;gt; variable and do the next thing each time.&lt;br&gt;
&lt;br&gt;
Sorry, don't really get it..&lt;br&gt;
&lt;br&gt;
a little bit more details please?</description>
    </item>
    <item>
      <pubDate>Fri, 18 Jul 2008 21:41:16 -0400</pubDate>
      <title>Re: go to next function in one callback?</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/172734#444035</link>
      <author>roberson@ibd.nrc-cnrc.gc.ca (Walter Roberson)</author>
      <description>In article &amp;lt;g5n6am$78p$1@fred.mathworks.com&amp;gt;,&lt;br&gt;
ching l &amp;lt;chinglnc@hotmail.com&amp;gt; wrote:&lt;br&gt;
&amp;gt;In Gui, how do I command the callback function to go to the&lt;br&gt;
&amp;gt;next function?&lt;br&gt;
&lt;br&gt;
&amp;gt;For example, when I first press the button, it will go to this, &lt;br&gt;
&lt;br&gt;
&amp;gt;function answer_faster_Callback(hObject, eventdata, handles)&lt;br&gt;
&amp;gt;csvwrite('subject1.dat',[1;00;55]);&lt;br&gt;
&lt;br&gt;
&amp;gt;then when I press again, it will go to this, &lt;br&gt;
&lt;br&gt;
&amp;gt;csvwrite('subject2.dat',[3;5;6]);&lt;br&gt;
&lt;br&gt;
&amp;gt;Possible to do that?&lt;br&gt;
&lt;br&gt;
Yes,&lt;br&gt;
&lt;br&gt;
function answer_faster_Callback(hObject, eventdata, handles)&lt;br&gt;
&amp;nbsp;&amp;nbsp;persistent fargs&lt;br&gt;
&amp;nbsp;&amp;nbsp;if isempty(fargs)&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;fargs.args = {{'subject1.dat',[1;00;55]}, {'subject2', [3;5;6]}, ...&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{'subject3.dat',[17;8;21]}, {'subject4', [255;0;255]};&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;fargs.count = 1;&lt;br&gt;
&amp;nbsp;&amp;nbsp;end&lt;br&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;csvwrite(fargs.args{fargs.count,1}, fargs.args{fargs.count,2});&lt;br&gt;
&amp;nbsp;&amp;nbsp;fargs.count = fargs.count + 1;&lt;br&gt;
&amp;nbsp;&amp;nbsp;if fargs.count &amp;gt; length(fargs.args)&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;set(hObject, 'Callback', '');&lt;br&gt;
&amp;nbsp;&amp;nbsp;end&lt;br&gt;
end&lt;br&gt;
-- &lt;br&gt;
Q: Why did the chicken cross the Mobius strip?&lt;br&gt;
&lt;br&gt;
A: There were manifold reasons.</description>
    </item>
    <item>
      <pubDate>Tue, 22 Jul 2008 05:52:01 -0400</pubDate>
      <title>Re: go to next function in one callback?</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/172734#444487</link>
      <author>ching l</author>
      <description>roberson@ibd.nrc-cnrc.gc.ca (Walter Roberson) wrote in&lt;br&gt;
message &amp;lt;g5r2ls$4l8$1@canopus.cc.umanitoba.ca&amp;gt;...&lt;br&gt;
&amp;gt; In article &amp;lt;g5n6am$78p$1@fred.mathworks.com&amp;gt;,&lt;br&gt;
&amp;gt; ching l &amp;lt;chinglnc@hotmail.com&amp;gt; wrote:&lt;br&gt;
&amp;gt; &amp;gt;In Gui, how do I command the callback function to go to the&lt;br&gt;
&amp;gt; &amp;gt;next function?&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; &amp;gt;For example, when I first press the button, it will go to&lt;br&gt;
this, &lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; &amp;gt;function answer_faster_Callback(hObject, eventdata, handles)&lt;br&gt;
&amp;gt; &amp;gt;csvwrite('subject1.dat',[1;00;55]);&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; &amp;gt;then when I press again, it will go to this, &lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; &amp;gt;csvwrite('subject2.dat',[3;5;6]);&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; &amp;gt;Possible to do that?&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Yes,&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; function answer_faster_Callback(hObject, eventdata, handles)&lt;br&gt;
&amp;gt;   persistent fargs&lt;br&gt;
&amp;gt;   if isempty(fargs)&lt;br&gt;
&amp;gt;     fargs.args = {{'subject1.dat',[1;00;55]}, {'subject2',&lt;br&gt;
[3;5;6]}, ...&lt;br&gt;
&amp;gt;                   {'subject3.dat',[17;8;21]}, {'subject4',&lt;br&gt;
[255;0;255]};&lt;br&gt;
&amp;gt;     fargs.count = 1;&lt;br&gt;
&amp;gt;   end&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt;   csvwrite(fargs.args{fargs.count,1},&lt;br&gt;
fargs.args{fargs.count,2});&lt;br&gt;
&amp;gt;   fargs.count = fargs.count + 1;&lt;br&gt;
&amp;gt;   if fargs.count &amp;gt; length(fargs.args)&lt;br&gt;
&amp;gt;      set(hObject, 'Callback', '');&lt;br&gt;
&amp;gt;   end&lt;br&gt;
&amp;gt; end&lt;br&gt;
&amp;gt; -- &lt;br&gt;
&amp;gt; Q: Why did the chicken cross the Mobius strip?&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; A: There were manifold reasons.&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
I got some changes of this...not very sure how to work it out...&lt;br&gt;
&lt;br&gt;
Is it possible to retain the previous value of the callback?&lt;br&gt;
something like this, but I know this is not right. I want&lt;br&gt;
the callback to store the previous count value and store in&lt;br&gt;
current count value&lt;br&gt;
&lt;br&gt;
handles.s {counter} = [(handles.id), (handles.randValue), 2] &lt;br&gt;
&lt;br&gt;
handles.scount= 1&lt;br&gt;
handles.scount= handles.scount +1 ;&lt;br&gt;
&lt;br&gt;
handles.s= [handles{count}, handles{count-1};]&lt;br&gt;
&lt;br&gt;
so let say handles.s {1} = [1, 2, 3];&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;handles.s {2} = [4, 5, 6]; handles {1};&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;handles.s {3} = [7, 8, 9]: handles {2};&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br&gt;
&lt;br&gt;
so on and so forth...</description>
    </item>
    <item>
      <pubDate>Tue, 22 Jul 2008 08:20:51 -0400</pubDate>
      <title>Re: go to next function in one callback?</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/172734#444497</link>
      <author>dreammissu</author>
      <description>This would set up network address, then to return to the kind of data transmission, is how the application of this &#194;&#187; That this is the first to write themselves a callback function, and then set up the callback function to libcurl Curry, and then specify what kind of format to receive data, when libcurl to return to the data will set the callback function. Are as follows:&lt;br&gt;
Callback function definitions:&lt;br&gt;
size_t write_data (void * buffer, size_t size, size_t nmemb, void * userp);&lt;br&gt;
Set up a callback function:&lt;br&gt;
curl_easy_setopt (easyhandle, CURLOPT_WRITEFUNCTION, write_data);&lt;br&gt;
Set up a callback function to receive the data format:&lt;br&gt;
curl_easy_setopt (easyhandle, CURLOPT_WRITEDATA, &amp; internal_struct);&lt;br&gt;
&amp;nbsp;&lt;br&gt;
Through the above settings, you can receive data to the callback function inside, then how is the kind libcurl command to start the download data or upload the data? &#194;&#187; Below on the function curl_easy_perform, this function is to connect remote sites, began operating agreements related to the order, calling the examples are as follows:&lt;br&gt;
success = curl_easy_perform (easyhandle);&lt;br&gt;
&amp;nbsp;&lt;br&gt;
Above through a series of calls, you can connect with the HTTP server and download the data and reached in the callback function. When finished using the library after this, do not forget to call functions curl_global_cleanup () to do the removal work.&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
[url=&lt;a href=&quot;http://www.kakasoft.com/]file&quot;&gt;http://www.kakasoft.com/]file&lt;/a&gt; encryption[/url]</description>
    </item>
    <item>
      <pubDate>Tue, 22 Jul 2008 09:09:03 -0400</pubDate>
      <title>Re: go to next function in one callback?</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/172734#444502</link>
      <author>ching l</author>
      <description>&quot;ching l&quot; &amp;lt;chinglnc@hotmail.com&amp;gt; wrote in message&lt;br&gt;
&amp;lt;g63si1$5h5$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; roberson@ibd.nrc-cnrc.gc.ca (Walter Roberson) wrote in&lt;br&gt;
&amp;gt; message &amp;lt;g5r2ls$4l8$1@canopus.cc.umanitoba.ca&amp;gt;...&lt;br&gt;
&amp;gt; &amp;gt; In article &amp;lt;g5n6am$78p$1@fred.mathworks.com&amp;gt;,&lt;br&gt;
&amp;gt; &amp;gt; ching l &amp;lt;chinglnc@hotmail.com&amp;gt; wrote:&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt;In Gui, how do I command the callback function to go to the&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt;next function?&lt;br&gt;
&amp;gt; &amp;gt; &lt;br&gt;
&amp;gt; &amp;gt; &amp;gt;For example, when I first press the button, it will go to&lt;br&gt;
&amp;gt; this, &lt;br&gt;
&amp;gt; &amp;gt; &lt;br&gt;
&amp;gt; &amp;gt; &amp;gt;function answer_faster_Callback(hObject, eventdata,&lt;br&gt;
handles)&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt;csvwrite('subject1.dat',[1;00;55]);&lt;br&gt;
&amp;gt; &amp;gt; &lt;br&gt;
&amp;gt; &amp;gt; &amp;gt;then when I press again, it will go to this, &lt;br&gt;
&amp;gt; &amp;gt; &lt;br&gt;
&amp;gt; &amp;gt; &amp;gt;csvwrite('subject2.dat',[3;5;6]);&lt;br&gt;
&amp;gt; &amp;gt; &lt;br&gt;
&amp;gt; &amp;gt; &amp;gt;Possible to do that?&lt;br&gt;
&amp;gt; &amp;gt; &lt;br&gt;
&amp;gt; &amp;gt; Yes,&lt;br&gt;
&amp;gt; &amp;gt; &lt;br&gt;
&amp;gt; &amp;gt; function answer_faster_Callback(hObject, eventdata, handles)&lt;br&gt;
&amp;gt; &amp;gt;   persistent fargs&lt;br&gt;
&amp;gt; &amp;gt;   if isempty(fargs)&lt;br&gt;
&amp;gt; &amp;gt;     fargs.args = {{'subject1.dat',[1;00;55]}, {'subject2',&lt;br&gt;
&amp;gt; [3;5;6]}, ...&lt;br&gt;
&amp;gt; &amp;gt;                   {'subject3.dat',[17;8;21]}, {'subject4',&lt;br&gt;
&amp;gt; [255;0;255]};&lt;br&gt;
&amp;gt; &amp;gt;     fargs.count = 1;&lt;br&gt;
&amp;gt; &amp;gt;   end&lt;br&gt;
&amp;gt; &amp;gt; &lt;br&gt;
&amp;gt; &amp;gt;   csvwrite(fargs.args{fargs.count,1},&lt;br&gt;
&amp;gt; fargs.args{fargs.count,2});&lt;br&gt;
&amp;gt; &amp;gt;   fargs.count = fargs.count + 1;&lt;br&gt;
&amp;gt; &amp;gt;   if fargs.count &amp;gt; length(fargs.args)&lt;br&gt;
&amp;gt; &amp;gt;      set(hObject, 'Callback', '');&lt;br&gt;
&amp;gt; &amp;gt;   end&lt;br&gt;
&amp;gt; &amp;gt; end&lt;br&gt;
&amp;gt; &amp;gt; -- &lt;br&gt;
&amp;gt; &amp;gt; Q: Why did the chicken cross the Mobius strip?&lt;br&gt;
&amp;gt; &amp;gt; &lt;br&gt;
&amp;gt; &amp;gt; A: There were manifold reasons.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; I got some changes of this...not very sure how to work it&lt;br&gt;
out...&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;nbsp;Is it possible to retain the previous value of the&lt;br&gt;
callback? something like this, but I know this is not right.&lt;br&gt;
I want the callback to store the previous count value and&lt;br&gt;
store in current count value&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
handles.scount= 1;&lt;br&gt;
handles.scount= handles.scount+1;&lt;br&gt;
&lt;br&gt;
handles.sc{handles.scount}= [handles.id,&lt;br&gt;
(handles.randValue), 2] &lt;br&gt;
&lt;br&gt;
handles.s = [handles.sc{handles.scount};&lt;br&gt;
handles.sc{handles.scount-1}] &lt;br&gt;
&lt;br&gt;
guidata(hObject, handles);&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
it still doesn't return the previous count value..any idea how?</description>
    </item>
    <item>
      <pubDate>Tue, 22 Jul 2008 13:41:12 -0400</pubDate>
      <title>Re: go to next function in one callback?</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/172734#444597</link>
      <author>Peter Boettcher</author>
      <description>&quot;ching l&quot; &amp;lt;chinglnc@hotmail.com&amp;gt; writes:&lt;br&gt;
&lt;br&gt;
&amp;gt;  Is it possible to retain the previous value of the&lt;br&gt;
&amp;gt; callback? something like this, but I know this is not right.&lt;br&gt;
&amp;gt; I want the callback to store the previous count value and&lt;br&gt;
&amp;gt; store in current count value&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; handles.scount= 1;&lt;br&gt;
&amp;gt; handles.scount= handles.scount+1;&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; handles.sc{handles.scount}= [handles.id,&lt;br&gt;
&amp;gt; (handles.randValue), 2] &lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; handles.s = [handles.sc{handles.scount};&lt;br&gt;
&amp;gt; handles.sc{handles.scount-1}] &lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; guidata(hObject, handles);&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; it still doesn't return the previous count value..any idea how?&lt;br&gt;
&lt;br&gt;
Get rid of the semicolons so you can see what's happening.  Look at the&lt;br&gt;
all the values on each click, figure out what isn't changing the way you&lt;br&gt;
want, fix it, and try again.&lt;br&gt;
&lt;br&gt;
-Peter</description>
    </item>
    <item>
      <pubDate>Tue, 22 Jul 2008 14:12:31 -0400</pubDate>
      <title>Re: go to next function in one callback?</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/172734#444610</link>
      <author>roberson@ibd.nrc-cnrc.gc.ca (Walter Roberson)</author>
      <description>In article &amp;lt;8001046.1216714882627.JavaMail.jakarta@nitrogen.mathforum.org&amp;gt;,&lt;br&gt;
dreammissu  &amp;lt;yushun1988829@gmail.com&amp;gt; wrote:&lt;br&gt;
&amp;gt;This would set up network address, then to return to the kind of data&lt;br&gt;
&amp;gt;transmission, is how the application of this&lt;br&gt;
&lt;br&gt;
dreammissu, is that a reply to the previous discussion, or did you happen&lt;br&gt;
to start a new discussion under an old title? If you were starting&lt;br&gt;
a new discussion, then I could not make out what your question was?&lt;br&gt;
-- &lt;br&gt;
&amp;nbsp;&amp;nbsp;&quot;What is important, then, is not that the critic should possess a&lt;br&gt;
&amp;nbsp;&amp;nbsp;correct abstract definition of beauty for the intellect, but a&lt;br&gt;
&amp;nbsp;&amp;nbsp;certain kind of temperament, the power of being deeply moved by&lt;br&gt;
&amp;nbsp;&amp;nbsp;the presence of beautiful objects.&quot;         -- Walter Pater</description>
    </item>
  </channel>
</rss>

