Autor Beitrag
Flash106
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 234


D7 Ent
BeitragVerfasst: Sa 29.01.05 13:12 
Hallo

ich habe eine editcompo gemacht aber das onexit ereigniss funtkioniert nicht. hier mal der source:

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
TmyCustomEdit = class(TLabeledEdit)
 ...
  published
    procedure Exit; override;
 ...
procedure TMyCustomEdit.Exit;
begin
  showmessage('test');
end;


bekomme als fehler das das Ereigniss Exit nicht in der Basisklasse wäre... hä?!?!?
hilfe.. :?
retnyg
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 2754

SNES, GB, GBA, CPC, A500, 486/66, P4/3.0HT: NintendOS, AmigaOS, DoS
Delphi 5, Delphi 7
BeitragVerfasst: Sa 29.01.05 13:43 
es muss so aussehen:
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
procedure click override (* forward-Deklaration *)

...

procedure TMyControl.Click;

begin

inherited Click;

... (* hier stehen Ihre Anpassungen *)

end


edit: war übrigens das resultat der google suche nach: class+TEdit+constructor+onexit
Flash106 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 234


D7 Ent
BeitragVerfasst: Sa 29.01.05 13:58 
ich bekomme den fehler aber schon in der deklaration :(..also da:

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
type
  TmyCustomEdit = class(TLabeledEdit)
...
  published
    procedure Click; override;
    procedure Exit; override; <-- da kommt der fehler
...
retnyg
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 2754

SNES, GB, GBA, CPC, A500, 486/66, P4/3.0HT: NintendOS, AmigaOS, DoS
Delphi 5, Delphi 7
BeitragVerfasst: Sa 29.01.05 14:00 
probier es trotzdem mal mit dem inherited unten ^^

vielleicht kennt TLABELEDIT auch kein OnExit ?
Flash106 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 234


D7 Ent
BeitragVerfasst: Sa 29.01.05 14:04 
hab das inherited ja schon eingebunden =) .. und ja lablededit kennt onexit. hatte ja vorher nen normales edit da kam der fehler auch.. noch ne idee?? ... weis nicht warum das nicht geht :(
retnyg
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 2754

SNES, GB, GBA, CPC, A500, 486/66, P4/3.0HT: NintendOS, AmigaOS, DoS
Delphi 5, Delphi 7
BeitragVerfasst: Sa 29.01.05 14:12 
64.233.183.104/searc...ted+onexit&hl=de

hast du die OnExit auch in den Properties ?
Flash106 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 234


D7 Ent
BeitragVerfasst: Sa 29.01.05 14:16 
ja hab ich jetz reingetan.. bringt auch nichts :(... *schnief* ... oh man.. hab alles so wie auf der seite die du geschickt hast...
retnyg
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 2754

SNES, GB, GBA, CPC, A500, 486/66, P4/3.0HT: NintendOS, AmigaOS, DoS
Delphi 5, Delphi 7
BeitragVerfasst: Sa 29.01.05 14:16 
und probiere mal ob es geht mit TEDIT statt TLABELEDEDIT. falls ja weisst du eh warum
Flash106 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 234


D7 Ent
BeitragVerfasst: Sa 29.01.05 14:22 
geht auch nicht.. klappt das denn bei dir alles soo??? fühl mich langsam blöd :?
retnyg
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 2754

SNES, GB, GBA, CPC, A500, 486/66, P4/3.0HT: NintendOS, AmigaOS, DoS
Delphi 5, Delphi 7
BeitragVerfasst: Sa 29.01.05 14:33 
hmmmm komisch, es liegt an dem Exit, bei click usw funzt es komischerweise
Flash106 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 234


D7 Ent
BeitragVerfasst: Sa 29.01.05 14:36 
jaaa... aber ich brauch das beim exit.. ist doch die db compo.. das edit soll doch beim verlassen erst in die db schreiben.. nicht bei change oder so... beim rausgehen.. aahh..... grrrr
retnyg
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 2754

SNES, GB, GBA, CPC, A500, 486/66, P4/3.0HT: NintendOS, AmigaOS, DoS
Delphi 5, Delphi 7
BeitragVerfasst: Sa 29.01.05 14:38 
so kannst du das umgehen:

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
   protected
     procedure  exit(Sender: TObject);
...

procedure  TDTNTEdit.exit;
begin
     showmessage('bla');
end;

constructor  TDTNTEdit.Create(AOwner:  TComponent);
begin
   {  Call  the  Create  method  of  the  parent  class  }
   inherited  Create(AOwner);
   onExit := Exit;
//   AutoInitialize;
end;
retnyg
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 2754

SNES, GB, GBA, CPC, A500, 486/66, P4/3.0HT: NintendOS, AmigaOS, DoS
Delphi 5, Delphi 7
BeitragVerfasst: Sa 29.01.05 14:47 
und funzts ?
Flash106 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 234


D7 Ent
BeitragVerfasst: Sa 29.01.05 14:48 
jaaaaaaaa
juchuuuuu DAAAAAAAAANKE!!!! :D
retnyg
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 2754

SNES, GB, GBA, CPC, A500, 486/66, P4/3.0HT: NintendOS, AmigaOS, DoS
Delphi 5, Delphi 7
BeitragVerfasst: Sa 29.01.05 14:50 
super freut mich :mrgreen: