Private

ListDate: TList <TDate>;

Of course, the main form OnCreate event handler that does create the list needed to be updated as well, becoming:

procedure TForml.FormCreate(Sender: TObject); begi n

ListDate := TList<TDate>.Create; end;

Now we can try to compile the rest of the code as it is. The program has a "wanted" bug, trying to add a TButton object to the list. The corresponding code used to compile and now fails:

procedure TForml.ButtonWrongClick(Sender: TObject); begi n

  • add a button to the list ListDate.Add (Sender); // Error:
  • E20l0 Incompatible types: 'TDate' and 'TObject'

Was this article helpful?

0 0
Project Management Made Easy

Project Management Made Easy

What you need to know about… Project Management Made Easy! Project management consists of more than just a large building project and can encompass small projects as well. No matter what the size of your project, you need to have some sort of project management. How you manage your project has everything to do with its outcome.

Get My Free Ebook


Post a comment