Solved

Descendant of TList

Posted on 1999-01-21
3
397 Views
Last Modified: 2013-11-23
Hi all,

In one of my Apps, I use a class that is a descendant of TList. So, how can I call a procedure everytime the count property of my class has changed?

regards
rene
0
Comment
Question by:rene100
  • 2
3 Comments
 
LVL 12

Accepted Solution

by:
rwilson032697 earned 100 total points
ID: 1362745
Override the add/delete/remove methods and call your procedure from those overridden methods.

eg:
// in class declaration
  procedure Add(Item : Pointer); Override;

// in main body
  procedure Add(Item : Pointer);
  begin
    Inherited Add(Item);
    DoMyThing;
  end;


0
 
LVL 12

Expert Comment

by:rwilson032697
ID: 1362746
Oops, there are a couple of problems:

eg:
    // in class declaration
      procedure Add(Item : Pointer);

    // in main body
      procedure TMyList.Add(Item : Pointer);
      begin
        Inherited Add(Item);
        DoMyThing;
      end;

Cheers,

Raymond.
0
 
LVL 2

Author Comment

by:rene100
ID: 1362747
Thanks for your help!
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
Hi friends,  in this video  I'll show you how new windows 10 user can learn the using of windows 10. Thank you.

863 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

25 Experts available now in Live!

Get 1:1 Help Now