<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/157313</link>
    <title>MATLAB Central Newsreader - About behavior of KeyPressFcn</title>
    <description>Feed for thread: About behavior of KeyPressFcn</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>Mon, 08 Oct 2007 11:00:37 -0400</pubDate>
      <title>About behavior of KeyPressFcn</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/157313#395539</link>
      <author>Jeroen Boschma</author>
      <description>Hi all,&lt;br&gt;
&lt;br&gt;
I'm using KeyPressFcn for an edit control. The problem is that within &lt;br&gt;
KeyPressFcn I need the actual String of the edit control _including_ the &lt;br&gt;
last typed character. However, within KeyPressFcn I only can get the 'old' &lt;br&gt;
value of the edit control before the key was pressed. This is of no use to &lt;br&gt;
me... Does anybody know a workaround for this without writing a complete &lt;br&gt;
interpreter for all keystrokes such that I have to calculate myself what the &lt;br&gt;
new contents of the edit control will be?&lt;br&gt;
&lt;br&gt;
Thanx,&lt;br&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;Jeroen </description>
    </item>
    <item>
      <pubDate>Mon, 08 Oct 2007 11:37:42 -0400</pubDate>
      <title>Re: About behavior of KeyPressFcn</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/157313#395543</link>
      <author>Yair Altman</author>
      <description>&quot;Jeroen Boschma&quot; &amp;lt;no_mail@please.com&amp;gt; wrote in message&lt;br&gt;
&amp;lt;470a0dd5$1@aurora.telecom.tno.nl&amp;gt;...&lt;br&gt;
&amp;gt; Hi all,&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; I'm using KeyPressFcn for an edit control. The problem is&lt;br&gt;
that within &lt;br&gt;
&amp;gt; KeyPressFcn I need the actual String of the edit control&lt;br&gt;
_including_ the &lt;br&gt;
&amp;gt; last typed character. However, within KeyPressFcn I only&lt;br&gt;
can get the 'old' &lt;br&gt;
&amp;gt; value of the edit control before the key was pressed. This&lt;br&gt;
is of no use to &lt;br&gt;
&amp;gt; me... Does anybody know a workaround for this without&lt;br&gt;
writing a complete &lt;br&gt;
&amp;gt; interpreter for all keystrokes such that I have to&lt;br&gt;
calculate myself what the &lt;br&gt;
&amp;gt; new contents of the edit control will be?&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Thanx,&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt;    Jeroen &lt;br&gt;
&lt;br&gt;
&lt;br&gt;
&lt;a href=&quot;http://www.mathworks.com/matlabcentral/newsreader/view_thread/151905&quot;&gt;http://www.mathworks.com/matlabcentral/newsreader/view_thread/151905&lt;/a&gt;&lt;br&gt;
&lt;br&gt;
Yair Altman&lt;br&gt;
&lt;a href=&quot;http://ymasoftware.com&quot;&gt;http://ymasoftware.com&lt;/a&gt;</description>
    </item>
    <item>
      <pubDate>Mon, 08 Oct 2007 12:12:49 -0400</pubDate>
      <title>Re: About behavior of KeyPressFcn</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/157313#395548</link>
      <author>Jeroen Boschma</author>
      <description>&lt;br&gt;
&quot;Yair Altman&quot; &amp;lt;altmanyDEL@gmailDEL.comDEL&amp;gt; wrote in message &lt;br&gt;
news:fed4q6$d89$1@fred.mathworks.com...&lt;br&gt;
&amp;gt; &quot;Jeroen Boschma&quot; &amp;lt;no_mail@please.com&amp;gt; wrote in message&lt;br&gt;
&amp;gt; &amp;lt;470a0dd5$1@aurora.telecom.tno.nl&amp;gt;...&lt;br&gt;
&amp;gt;&amp;gt; Hi all,&lt;br&gt;
&amp;gt;&amp;gt;&lt;br&gt;
&amp;gt;&amp;gt; I'm using KeyPressFcn for an edit control. The problem is&lt;br&gt;
&amp;gt; that within&lt;br&gt;
&amp;gt;&amp;gt; KeyPressFcn I need the actual String of the edit control&lt;br&gt;
&amp;gt; _including_ the&lt;br&gt;
&amp;gt;&amp;gt; last typed character. However, within KeyPressFcn I only&lt;br&gt;
&amp;gt; can get the 'old'&lt;br&gt;
&amp;gt;&amp;gt; value of the edit control before the key was pressed. This&lt;br&gt;
&amp;gt; is of no use to&lt;br&gt;
&amp;gt;&amp;gt; me... Does anybody know a workaround for this without&lt;br&gt;
&amp;gt; writing a complete&lt;br&gt;
&amp;gt;&amp;gt; interpreter for all keystrokes such that I have to&lt;br&gt;
&amp;gt; calculate myself what the&lt;br&gt;
&amp;gt;&amp;gt; new contents of the edit control will be?&lt;br&gt;
&amp;gt;&amp;gt;&lt;br&gt;
&amp;gt;&amp;gt; Thanx,&lt;br&gt;
&amp;gt;&amp;gt;&lt;br&gt;
&amp;gt;&amp;gt;    Jeroen&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; &lt;a href=&quot;http://www.mathworks.com/matlabcentral/newsreader/view_thread/151905&quot;&gt;http://www.mathworks.com/matlabcentral/newsreader/view_thread/151905&lt;/a&gt;&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; Yair Altman&lt;br&gt;
&amp;gt; &lt;a href=&quot;http://ymasoftware.com&quot;&gt;http://ymasoftware.com&lt;/a&gt;&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt;&lt;br&gt;
OK, thanks for the pointer Yair. I downloaded your 'findjobj' and try to &lt;br&gt;
find out the essence of it so I can write a smaller version of the whole &lt;br&gt;
underlying idea, for performance issues. Only need the single 'edit'-thingie &lt;br&gt;
:-)&lt;br&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;Jeroen </description>
    </item>
    <item>
      <pubDate>Wed, 07 Jul 2010 20:16:08 -0400</pubDate>
      <title>Re: About behavior of KeyPressFcn</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/157313#760666</link>
      <author>Jason Wang</author>
      <description>Sorry for bumping such an old topic!  I just spent all afternoon finding the solution to this problem.  I used FindJObj, which sort of worked, but was a ridiculously convoluted process.  Turns out, the solution was to just put a short &quot;pause&quot; before retrieving the string.  For example&lt;br&gt;
&lt;br&gt;
pause(.5)&lt;br&gt;
pathname=get(handles.pathBox,'String');&lt;br&gt;
&lt;br&gt;
I'm not sure if this is ridiculously trivial, but I thought it might be useful to point out anyways, since it doesn't seem like anyone else has.  Matlab's documentation on the function callbacks are way too sparse IMO!</description>
    </item>
    <item>
      <pubDate>Sat, 07 Aug 2010 11:58:04 -0400</pubDate>
      <title>Re: About behavior of KeyPressFcn</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/157313#769418</link>
      <author>Mohammed El-Said </author>
      <description>&quot;Jason Wang&quot; &amp;lt;sjwang40@gmail.com&amp;gt; wrote in message &amp;lt;i12na8$n0s$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; Sorry for bumping such an old topic!  I just spent all afternoon finding the solution to this problem.  I used FindJObj, which sort of worked, but was a ridiculously convoluted process.  Turns out, the solution was to just put a short &quot;pause&quot; before retrieving the string.  For example&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; pause(.5)&lt;br&gt;
&amp;gt; pathname=get(handles.pathBox,'String');&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; I'm not sure if this is ridiculously trivial, but I thought it might be useful to point out anyways, since it doesn't seem like anyone else has.  Matlab's documentation on the function callbacks are way too sparse IMO!&lt;br&gt;
&lt;br&gt;
Dear Jason Wang&lt;br&gt;
Thanks for posting a solution&lt;br&gt;
your solution is working like a charm&lt;br&gt;
&lt;br&gt;
and please feel free to bump all old topics if you have good solutions for them :)&lt;br&gt;
&lt;br&gt;
Mohammed El-Said&lt;br&gt;
www.mohammed-elsaid.tk </description>
    </item>
  </channel>
</rss>

