?
Solved

This form of method call only allowed for class methods

Posted on 2007-10-15
3
Medium Priority
?
2,405 Views
Last Modified: 2008-01-09
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
0
Comment
Question by:ahinst
  • 2
3 Comments
 
LVL 17

Expert Comment

by:mokule
ID: 20076524
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
 
LVL 17

Accepted Solution

by:
mokule earned 2000 total points
ID: 20076531
or
prOpcServer.OpcItemServer.ShutdownRequest('PHJ requested shutdown', -1);
0
 

Author Comment

by:ahinst
ID: 20076824
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

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
this video summaries big data hadoop online training demo (http://onlineitguru.com/big-data-hadoop-online-training-placement.html) , and covers basics in big data hadoop .
Despite its rising prevalence in the business world, "the cloud" is still misunderstood. Some companies still believe common misconceptions about lack of security in cloud solutions and many misuses of cloud storage options still occur every day. …
Suggested Courses
Course of the Month17 days, 10 hours left to enroll

829 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question