This form of method call only allowed for class methods

Posted on 2007-10-15
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;
  Windows, Unit5, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
  StdCtrls, ComCtrls, ExtCtrls, prOpcClient, prOpcTypes, prOpcUtils,
  prOpcServerSelect, prOpcServer;
  TForm99 = class(TForm)
   procedure Button3Click(Sender: TObject);
procedure TForm99.Button3Click(Sender: TObject);
   prOpcServer.TOpcItemServer.ShutdownRequest('PHJ requested shutdown', -1);


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?

Question by:ahinst
    LVL 17

    Expert Comment

    I don't know what You're talking about completely, but
    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);
    LVL 17

    Accepted Solution

    prOpcServer.OpcItemServer.ShutdownRequest('PHJ requested shutdown', -1);

    Author Comment

    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.

    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    Join & Write a Comment

    In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
    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…
    To add imagery to an HTML email signature, you have two options available to you. You can either add a logo/image by embedding it directly into the signature or hosting it externally and linking to it. The vast majority of email clients display l…
    Hi everyone! This is Experts Exchange customer support.  This quick video will show you how to change your primary email address.  If you have any questions, then please Write a Comment below!

    729 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

    Need Help in Real-Time?

    Connect with top rated Experts

    21 Experts available now in Live!

    Get 1:1 Help Now