08/11/17 19:26:44
Delphiのimplements指令がいまいちわかりません。
下記サイトでサンプルコードがあったのですが、
An Introduction to COM Programming with Delphi (3 / 6)
URLリンク(delphi.about.com)
結局、implementsを書いたクラスは一度interfaceにキャストしないと
メソッドよめないんでしょうか?
var
Test: TTest;
Foo: IFoo;
begin
Test := TTest.Create;
Foo := Test;
Foo.Bar; // FooにキャストしないとBarに呼べない