Google 網路論壇不再支援新的 Usenet 貼文或訂閱項目,但過往內容仍可供查看。

IDE keeps adding interface methods

瀏覽次數:0 次
跳到第一則未讀訊息

Berend Veldkamp

未讀,
2001年10月16日 上午8:28:212001/10/16
收件者:
I have a COM object like this:

type
TMyCOMObject = class (TTypedComObject, ISomeIntf, ISomeOtherIntf)
private
F_SomeObj: ISomeIntf;
function get_SomeObj: ISomeIntf;
function get_SomeOtherObj: ISomeOtherIntf;
protected
property SomeObj: ISomeIntf read get_SomeObj implements ISomeIntf;
property SomeOtherObj: ISomeOtherIntf read get_SomeOtherObjf
implements ISomeOtherIntf;
end;


function get_SomeObj: ISomeInterface;
begin
if F_SomeObj = nil then
F_SomeObj := coSomeIntf.Create as ISomeIntf;
result := F_SomeObj;
end;

function get_SomeOtherObj: ISomeOtherIntf;
begin
// SomeObj implements ISomeOtherInf
result := SomeObj as ISomeOtherIntf;
end;

This works, but each time I change something in the Type Library Editor,
Delphi adds empty procedures for the ISomeOtherIntf interface to the
class declaration. Is there anything I can do to stop this behaviour?
At other times when I _do_ want to add methods to implement, Delphi adds
only some of the methods, not all.

TIA, Berend


--

0 則新訊息