This form of method call only allowed for class methods

Hi, I have a program that gives the following error at compile time.
[Pascal Error] Unit99.pas(738): E2076 This form of method call only allowed for class methods
The program is:-
unit Unit99;
interface
uses
  Windows, Unit5, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
  StdCtrls, ComCtrls, ExtCtrls, prOpcClient, prOpcTypes, prOpcUtils,
  prOpcServerSelect, prOpcServer;
type
  TForm99 = class(TForm)
   procedure Button3Click(Sender: TObject);
...
more
....
procedure TForm99.Button3Click(Sender: TObject);
begin
   prOpcServer.TOpcItemServer.ShutdownRequest('PHJ requested shutdown', -1);
end;

end.

The offending line starts with prOpcServer. The OPC server came with an example of how to use the OPC call which is exactly what I copied but in my program it will not compite. Any ideas?

AHINST
ahinstAsked:
Who is Participating?
 
mokuleCommented:
or
prOpcServer.OpcItemServer.ShutdownRequest('PHJ requested shutdown', -1);
0
 
mokuleCommented:
I don't know what You're talking about completely, but
in
prOpcServer.TOpcItemServer.ShutdownRequest('PHJ requested shutdown', -1);

TOpcItemServer looks like a class name which is strange.

maybe it should be
prOpcServer.ShutdownRequest('PHJ requested shutdown', -1);
0
 
ahinstAuthor Commented:
Thanks a lot the second gave results. There seems to be a typo in the instruction manual that puts the T infrom of teh OpcItemServer.

Thank you.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.