Solved

Descendant of TList

Posted on 1999-01-21
3
392 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

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
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…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

743 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

12 Experts available now in Live!

Get 1:1 Help Now