Autor Beitrag
Minime
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 32



BeitragVerfasst: Sa 21.10.06 21:28 
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
//
TCustom = class
 procedure Onclick(Sender:TObject);
end;
//....
MItem := TMenuItem.Create(nil);
MItem.OnClick := TCustom.Onclick();


es kommt immer das nicht genügend wirkliche parameter vorhanden sind

sonst klappt das auch so

jemand ne idee?
alias5000
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 2145

WinXP Prof SP2, Ubuntu 9.04
C/C++(Code::Blocks, VS.NET),A51(Keil),Object Pascal(D2005PE, Turbo Delphi Explorer) C# (VS 2008 Express)
BeitragVerfasst: Sa 21.10.06 21:38 
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
//
TCustom = class
 procedure Onclick(Sender:TObject);
end;

var Custom: TCustom
//....
MItem := TMenuItem.Create(nil);
Custom := TSustom.Create;
MItem.OnClick := Custom.Onclick; //Die Klammern wegmachen!


Du solltest desweiteren die Prozedur einer bestehenden Instanz von TCustom zuweisen, das müsste dir IMHO sonst auch irgendwann einen Fehler liefern (also wenn du nur mit der Klasse arbeitest)

Gruß alias5000

_________________
Programmers never die, they just GOSUB without RETURN
Minime Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 32



BeitragVerfasst: Sa 21.10.06 22:17 
thnx

war ja nur pseudocode ^^