 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Guest
|
Posted: Wed Mar 01, 2006 3:03 pm Post subject: simple interface don't know why i'm getting errors |
|
|
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? |
|
| Back to top |
|
 |
Riki Wiki Guest
|
Posted: Sun Mar 05, 2006 4:03 am Post subject: Re: simple interface don't know why i'm getting errors |
|
|
On 1 Mar 2006 06:55:45 -0800, dancomp71 (AT) aol (DOT) com wrote:
| Quote: | 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> |
|
| Back to top |
|
 |
ZipBreak Guest
|
Posted: Mon Mar 27, 2006 7:05 am Post subject: Re: simple interface don't know why i'm getting errors |
|
|
| Quote: | 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 |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|