Posted by John Ferguson on 1999-03-12
Vincent wrote:
Whenever I compile I get the error;
[Error] readthread.pas(45): This form of method call only allowed for class
methods
for this line;
TForm1.ReadPort(nil);
************************************************************
The problem with this line is that TForm1 is a class definition, not an
instantiated variable. Try accessing this function with Form1.ReadPort(nil)
instead.
Vincent wrote:
I will change it to;
ReadPort(nil);
But then I get the error;
[Error] readthread.pas(45): Undeclared identifier: 'ReadPort'
************************************************************
The problem with this line is that ReadPort is out of scope. The only time you
can call a method like this is within the class itself.
JOHNF
Previous post | Next post | Timeline | Home