Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

simple interface don't know why i'm getting errors

6 views
Skip to first unread message

danc...@aol.com

unread,
Mar 1, 2006, 9:55:42 AM3/1/06
to
I tried the following and i'm getting the EOleError 'Object factory for
class TActionItem missing'.

program FWTest02;

{$APPTYPE CONSOLE}

uses
ExceptionLog,
SysUtils
, ComObj
;

type
IActionItem = interface
function GetName : String;
end;

TActionItem = class(TComObject, IActionItem)
function GetName : String;
end;

var
ai : IActionItem;
{ TActionItem }

function TActionItem.GetName: String;
begin
Result := 'ActionItem';
end;

begin
ai := TActionItem.Create;
writeln(ai.GetName);
end.

what am i doing wrong?

Message has been deleted
Message has been deleted

Riki Wiki

unread,
Mar 4, 2006, 10:34:17 PM3/4/06
to
On 1 Mar 2006 06:55:45 -0800, danc...@aol.com wrote:

> what am i doing wrong?

Hoi Dan

You need to repost your question on the Borland news server to make
everybody see it and possibly answer your question. Further, this news
group do not officially exist, the group to use is
b.p.d.language.delphi.general.

Take a look here:
<http://tinyurl.com/8m5nw>
which links to
<http://delphi.wikicities.com/wiki/Delphi_Newsgroups>

ZipBreak

unread,
Mar 27, 2006, 1:59:43 AM3/27/06
to
> TActionItem = class(TComObject, IActionItem)
> function GetName : String;
> end;

Inherit from TInterfacedObject NOT from TComObject. TComObject will
require you to initialize the COM subsystem of Windows -- which is a
waste since you're just using your interfaces internally.

Cheers,
Vij

0 new messages