Einzelnen Beitrag anzeigen

Benutzerbild von Stevie
Stevie

Registriert seit: 12. Aug 2003
Ort: Soest
4.016 Beiträge
 
Delphi 10.1 Berlin Enterprise
 
#13

AW: My Delphi 2010 is sick

  Alt 5. Jul 2012, 12:56
Your dfm file does not match the pas file.

When loading the form it streams the dfm file and creates the components and places the references in the published fields if they exist (yes, you can have a component on your form but no field in your pas file, if you don't need to access it). But it does not work the other way around. If you placed your component field in the published part (which is by default if you dont specify the visibility) but never created it yourself.

Usually the IDE also complains about this when saving your form (like "Field Form1.CheckBox1 does not have a corresponding component. Remove the declaration?")

Also: did you call inherited in your custom constructor?
Stefan
“Simplicity, carried to the extreme, becomes elegance.” Jon Franklin

Delphi Sorcery - DSharp - Spring4D - TestInsight
  Mit Zitat antworten Zitat