<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
  <channel>
    <title>'writing a component' Thread RSS Feed</title>
    <link>http://www.programmersheaven.com/</link>
    <description>Contains the latest posts from the thread 'writing a component' posted on the 'Delphi and Kylix' forum at Programmer's Heaven.</description>
    <language>en</language>
    <copyright>Copyright 2013 Programmers Heaven</copyright>
    <pubDate>Mon, 17 Jun 2013 23:46:21 -0700</pubDate>
    <lastBuildDate>Mon, 17 Jun 2013 23:46:21 -0700</lastBuildDate>
    <generator>Argotic Syndication Framework 2007.3.0.1, http://www.codeplex.com/Argotic</generator>
    <docs>http://www.rssboard.org/rss-specification</docs>
    <ttl>360</ttl>
    <image>
      <url>http://www.programmersheaven.com/images/ph.gif</url>
      <title>Programmers Heaven</title>
      <link>http://www.programmersheaven.com/</link>
      <width>88</width>
      <height>31</height>
    </image>
    <item>
      <title>writing a component</title>
      <link>http://www.programmersheaven.com/mb/delphikylix/184307/184307/writing-a-component/</link>
      <description>Hi,&lt;br /&gt;
I'm writing a component which extends TCustomRichEdit and has its own&lt;br /&gt;
AddLine procedure. However whenever I do a second AddLine it starts&lt;br /&gt;
doing crazy things like changing some of my variables when I use&lt;br /&gt;
SelText. Any ideas as to what is happening?&lt;br /&gt;
&lt;br /&gt;
Thanks&lt;br /&gt;
&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/delphikylix/184307/184307/writing-a-component/</guid>
      <pubDate>Mon, 21 Apr 2003 18:08:07 -0700</pubDate>
      <category>Delphi and Kylix</category>
    </item>
    <item>
      <title>Re: writing a component</title>
      <link>http://www.programmersheaven.com/mb/delphikylix/184307/184373/re-writing-a-component/#184373</link>
      <description>: Hi,&lt;br /&gt;
: I'm writing a component which extends TCustomRichEdit and has its own&lt;br /&gt;
: AddLine procedure. However whenever I do a second AddLine it starts&lt;br /&gt;
: doing crazy things like changing some of my variables when I use&lt;br /&gt;
: SelText. Any ideas as to what is happening?&lt;br /&gt;
&lt;br /&gt;
Without seeing your code, probably not.&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/delphikylix/184307/184373/re-writing-a-component/#184373</guid>
      <pubDate>Tue, 22 Apr 2003 05:27:01 -0700</pubDate>
      <category>Delphi and Kylix</category>
    </item>
    <item>
      <title>Re: writing a component</title>
      <link>http://www.programmersheaven.com/mb/delphikylix/184307/184517/re-writing-a-component/#184517</link>
      <description>ok, here is my code for the addline procedure &lt;br /&gt;
&lt;br /&gt;
procedure TSyntaxEdit.AddLine(Value: string);&lt;br /&gt;
var&lt;br /&gt;
  nPos: PChar;&lt;br /&gt;
begin&lt;br /&gt;
  nPos := PChar(Value);&lt;br /&gt;
  nextLine := Value; // nextLine is a string&lt;br /&gt;
  currentSpelling := ''; //string&lt;br /&gt;
  currentChar := char(nPos[0]); // char&lt;br /&gt;
  currentPos := 1; // integer&lt;br /&gt;
&lt;br /&gt;
  nWord := scanToken; // gets next token from nextLine string&lt;br /&gt;
  while nWord &amp;lt;&amp;gt; '' do&lt;br /&gt;
  begin&lt;br /&gt;
    doSyntax; // performs syntax highlighting&lt;br /&gt;
    SelText := nWord;&lt;br /&gt;
    endSyntax;&lt;br /&gt;
    nWord := scanToken;&lt;br /&gt;
  end;&lt;br /&gt;
  SelText := #10;&lt;br /&gt;
  endLine;&lt;br /&gt;
&lt;br /&gt;
  OnChange := DoChange;&lt;br /&gt;
end;&lt;br /&gt;
&lt;br /&gt;
when SelText is performed on the 2nd use of addline (1st works fine) it puts garbage into some of my variables like currentPos and currentChar, which stuffs up the scanToken function and puts the procedure in an infinite loop.&lt;br /&gt;
Any ideas why this is happening? Any help would be greatly appreciated.&lt;br /&gt;
&lt;br /&gt;
Thanks.&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/delphikylix/184307/184517/re-writing-a-component/#184517</guid>
      <pubDate>Tue, 22 Apr 2003 17:03:33 -0700</pubDate>
      <category>Delphi and Kylix</category>
    </item>
    <item>
      <title>Re: writing a component</title>
      <link>http://www.programmersheaven.com/mb/delphikylix/184307/185107/re-writing-a-component/#185107</link>
      <description>Try to add "override" after the declaration.&lt;br /&gt;
&lt;br /&gt;
-----------------&lt;br /&gt;
Dima Gornushkin&lt;br /&gt;
&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/delphikylix/184307/185107/re-writing-a-component/#185107</guid>
      <pubDate>Fri, 25 Apr 2003 07:02:36 -0700</pubDate>
      <category>Delphi and Kylix</category>
    </item>
  </channel>
</rss>