如何调用其它Unit中的类方法?
两个Unit如下:
unit1
...
TForm1 = class(TForm)
...
public
procedure M1(arg1:string);
end;
implementation
uses unit2;
...
unit2
...
TForm2 = class(TForm)
private
procedure M2;
end;
implementation
uses unit1;
..
在unit2中M2方法中如何调用unit1,Form1中的M1方法?
我是这样写的:
Form1.M1(arg);
为什么会出错???不解啊!