Autor Beitrag
Sven
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 314


D6 Ent, K3 Pro (patched)
BeitragVerfasst: Mi 11.12.02 17:00 
Ich bekomme vom Compiler folgende Warnung:

ausblenden Quelltext
1:
[Warnung] frmBCAD.pas(135): Methode 'MouseDown' verbirgt virtuelle Methode vom Basistyp 'TControl'					


Was bedeuted das und welche negativen Einflüsse hat es auf das Laufzeitverhalten des Programms?

_________________
MDK 9.1, Kernel 2.4.21, KDE 3.1 Kylix 3 Pro (patched), nutze aber auch Windows
aogwaba
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 109



BeitragVerfasst: Mi 11.12.02 21:42 
Hi!
Das bedeutet das deine MouseDown-procedure die TControl.MouseDown procedure 'verdeckt'.
Um trotzdem auf die procedure von TControl zugreiffen zu können, musst du
deine procedure als override deklarieren:
Form1.MouseDown;override

cu
waba
Sven Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 314


D6 Ent, K3 Pro (patched)
BeitragVerfasst: Do 12.12.02 08:44 
Es geht hierbei um die Hauptform meines Programms. Die Methode wurde ebenfalls von Delphi eingefügt. Wenn ich jetzt in der Deklaration override; hinten anfügen, bekomme ich sogar noch einen "Fatalen Fehler" gemeldet. Habe ich da einen Bug in D6 entdeckt?

_________________
MDK 9.1, Kernel 2.4.21, KDE 3.1 Kylix 3 Pro (patched), nutze aber auch Windows
Tino
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Veteran
Beiträge: 9839
Erhaltene Danke: 45

Windows 8.1
Delphi XE4
BeitragVerfasst: Do 12.12.02 10:12 
Hallo,

ich denke Du hast den Namen für Deine Procedure nicht deshalb MouseDown genannt weil Du die Procedure überschreiben möchtest, oder? Wenn es so ist dann benenne die Procedure einfach um.

Gruß
TINO
Sven Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 314


D6 Ent, K3 Pro (patched)
BeitragVerfasst: Do 12.12.02 10:30 
:oops: Danke das Ihr so hilfreich einen Blinden über die Straße geführt habt. :wink:

_________________
MDK 9.1, Kernel 2.4.21, KDE 3.1 Kylix 3 Pro (patched), nutze aber auch Windows