<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
  <channel>
    <title>'performing procedure onclick of array element' Thread RSS Feed</title>
    <link>http://www.programmersheaven.com/</link>
    <description>Contains the latest posts from the thread 'performing procedure onclick of array element' posted on the 'Delphi and Kylix' forum at Programmer's Heaven.</description>
    <language>en</language>
    <copyright>Copyright 2013 Programmers Heaven</copyright>
    <pubDate>Sat, 25 May 2013 09:31:22 -0700</pubDate>
    <lastBuildDate>Sat, 25 May 2013 09:31:22 -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>performing procedure onclick of array element</title>
      <link>http://www.programmersheaven.com/mb/delphikylix/202922/202922/performing-procedure-onclick-of-array-element/</link>
      <description>Hi,&lt;br /&gt;
&lt;br /&gt;
I have a for loop that creates a series of labels, captioned with the file name of a series of files. When each is clicked, I want it to perform the procedure LoadEntry(I), where I is the integer value of the entry no to load. My procedure LoadEntry works fine, but there is an error in the code below&lt;br /&gt;
&lt;br /&gt;
     //print a list of the last 20 entries&lt;br /&gt;
     for I := 1 to StrToInt(latestentry()) do&lt;br /&gt;
       begin&lt;br /&gt;
         if (I &amp;gt; 20) then&lt;br /&gt;
         break;&lt;br /&gt;
         entryno:=StrToInt(latestentry())-I+1;&lt;br /&gt;
         LabelArray[I] := TLabel.Create(Self);&lt;br /&gt;
         LabelArray[I].Parent := Self;&lt;br /&gt;
         LabelArray[I].Left := 408;&lt;br /&gt;
         LabelArray[I].Top := 136 + 15 * I;&lt;br /&gt;
         LabelArray[I].OnClick:=LoadEntry(entryno);&lt;br /&gt;
         fileurl := 'entries/'+IntToStr(entryno)+'.jnl';&lt;br /&gt;
         LabelArray[I].Caption := 'Entry #'+IntToStr(entryno)+': '+DateTimeToStr(FileDateToDateTime(FileAge(fileurl
)));;&lt;br /&gt;
       end;&lt;br /&gt;
&lt;br /&gt;
The error is in the line with the onClick handler. Any ideas?&lt;br /&gt;
&lt;br /&gt;
Many thanks,&lt;br /&gt;
&lt;br /&gt;
Micah&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/delphikylix/202922/202922/performing-procedure-onclick-of-array-element/</guid>
      <pubDate>Wed, 23 Jul 2003 09:50:14 -0700</pubDate>
      <category>Delphi and Kylix</category>
    </item>
    <item>
      <title>Re: performing procedure onclick of array element</title>
      <link>http://www.programmersheaven.com/mb/delphikylix/202922/202951/re-performing-procedure-onclick-of-array-element/#202951</link>
      <description>you can only assign a TNotifyEvent to the OnClick. if you need the number then i'd suggest you'd use the TEdit(Sender).Tag&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/delphikylix/202922/202951/re-performing-procedure-onclick-of-array-element/#202951</guid>
      <pubDate>Wed, 23 Jul 2003 12:41:26 -0700</pubDate>
      <category>Delphi and Kylix</category>
    </item>
    <item>
      <title>Re: performing procedure onclick of array element</title>
      <link>http://www.programmersheaven.com/mb/delphikylix/202922/202964/re-performing-procedure-onclick-of-array-element/#202964</link>
      <description>: you can only assign a TNotifyEvent to the OnClick. if you need the number then i'd suggest you'd use the TEdit(Sender).Tag&lt;br /&gt;
: &lt;br /&gt;
Can you give me an idea of how to do this?&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/delphikylix/202922/202964/re-performing-procedure-onclick-of-array-element/#202964</guid>
      <pubDate>Wed, 23 Jul 2003 14:02:07 -0700</pubDate>
      <category>Delphi and Kylix</category>
    </item>
    <item>
      <title>Re: performing procedure onclick of array element</title>
      <link>http://www.programmersheaven.com/mb/delphikylix/202922/203046/re-performing-procedure-onclick-of-array-element/#203046</link>
      <description>: : you can only assign a TNotifyEvent to the OnClick. if you need the number then i'd suggest you'd use the TEdit(Sender).Tag&lt;br /&gt;
: : &lt;br /&gt;
: Can you give me an idea of how to do this?&lt;br /&gt;
: &lt;br /&gt;
Actually, I got it!&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/delphikylix/202922/203046/re-performing-procedure-onclick-of-array-element/#203046</guid>
      <pubDate>Thu, 24 Jul 2003 02:13:37 -0700</pubDate>
      <category>Delphi and Kylix</category>
    </item>
  </channel>
</rss>