<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Edit mit Int -&amp;gt; OnChange -&amp;gt; &amp;quot;&amp;quot; ist kein gültiger Wert]]></title><description><![CDATA[<p>also ich trage die erste Zahl ins Feld ein und dann kommt dieser Fehler...</p>
<pre><code class="language-cpp">void __fastcall TForm1::OnChangePV(TObject *Sender)
{
  AnsiString wzahl = P-&gt;Text;
  if(wzahl.Length() == 0)
  {
    P-&gt;Color = clWhite;
    return;
  }
  int zahl = wzahl.ToInt();
  bool prim = primzahl(zahl);
  if(!prim || Q-&gt;Text == P-&gt;Text)
  {
    P-&gt;Color = clYellow;
  }else{
    P-&gt;Color = clWhite;
  }
  AnsiString q = Q-&gt;Text;
  AnsiString p = P-&gt;Text;
  int pp = p.ToInt();
  int qq = q.ToInt();
  if(qq == 1 || pp == 1)
  {
    Q-&gt;Color = clRed;
    P-&gt;Color = clRed;
    error = true;
  }
  error = false;
  schluesselBerechnen();
}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/topic/185096/edit-mit-int-gt-onchange-gt-quot-quot-ist-kein-gültiger-wert</link><generator>RSS for Node</generator><lastBuildDate>Sun, 16 Aug 2026 08:57:58 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/185096.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 21 Jun 2007 18:33:13 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Edit mit Int -&amp;gt; OnChange -&amp;gt; &amp;quot;&amp;quot; ist kein gültiger Wert on Thu, 21 Jun 2007 18:33:13 GMT]]></title><description><![CDATA[<p>also ich trage die erste Zahl ins Feld ein und dann kommt dieser Fehler...</p>
<pre><code class="language-cpp">void __fastcall TForm1::OnChangePV(TObject *Sender)
{
  AnsiString wzahl = P-&gt;Text;
  if(wzahl.Length() == 0)
  {
    P-&gt;Color = clWhite;
    return;
  }
  int zahl = wzahl.ToInt();
  bool prim = primzahl(zahl);
  if(!prim || Q-&gt;Text == P-&gt;Text)
  {
    P-&gt;Color = clYellow;
  }else{
    P-&gt;Color = clWhite;
  }
  AnsiString q = Q-&gt;Text;
  AnsiString p = P-&gt;Text;
  int pp = p.ToInt();
  int qq = q.ToInt();
  if(qq == 1 || pp == 1)
  {
    Q-&gt;Color = clRed;
    P-&gt;Color = clRed;
    error = true;
  }
  error = false;
  schluesselBerechnen();
}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1310968</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1310968</guid><dc:creator><![CDATA[Dragonfire]]></dc:creator><pubDate>Thu, 21 Jun 2007 18:33:13 GMT</pubDate></item><item><title><![CDATA[Reply to Edit mit Int -&amp;gt; OnChange -&amp;gt; &amp;quot;&amp;quot; ist kein gültiger Wert on Thu, 21 Jun 2007 19:32:36 GMT]]></title><description><![CDATA[<p>Hallo</p>
<p>Der Fehler kann nur von den ToInt() verursacht werden. wzahl überprüfst du ja schon, aber p und q nicht. Du must zumindestens die auch noch überprüfen.<br />
Sinnvoller ist aber eine von den zwei Möglichkeiten :<br />
- IntToStrDef oder try/catch benutzen um <strong>alle</strong> nicht umwandelbaren Strings zu filtern, nicht nur die leeren<br />
- Die Eingabemöglichkeit schon auf Ziffern beschränken, entweder mit TMaskEdit oder mit der <a href="http://www.bytesandmore.de/rad/index.htm?http://www.bytesandmore.de/rad/cpp/snipp/sc02025.php" rel="nofollow">WinAPI</a></p>
<p>bis bald<br />
akari</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1311003</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1311003</guid><dc:creator><![CDATA[akari]]></dc:creator><pubDate>Thu, 21 Jun 2007 19:32:36 GMT</pubDate></item><item><title><![CDATA[Reply to Edit mit Int -&amp;gt; OnChange -&amp;gt; &amp;quot;&amp;quot; ist kein gültiger Wert on Thu, 21 Jun 2007 19:34:43 GMT]]></title><description><![CDATA[<p>Hi!, danke!</p>
<p>Ich habe den Fehler grade gefunden.</p>
<p>BTW, in das Edit Feld gehen schon nur Ziffern <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f609.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--winking_face"
      title=";)"
      alt="😉"
    /></p>
<p>THX nochmal <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f603.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--grinning_face_with_big_eyes"
      title=":D"
      alt="😃"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1311005</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1311005</guid><dc:creator><![CDATA[Dragonfire]]></dc:creator><pubDate>Thu, 21 Jun 2007 19:34:43 GMT</pubDate></item></channel></rss>