Solved

Descendant of TList

Posted on 1999-01-21
3
406 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
Suggested Courses
Course of the Month11 days, 2 hours left to enroll

628 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