Ready to Participate?
Lazarus pascal dialog help needed
This is the part of my code that's messed up.
procedure TForm1.OpenMenuItemClick(Sender: TObject);
It tells me "Error: Only class methods can be referred with class references". Do you have any solutions I can try out?
asked in computer, programming, pascal
This error occurs in a situation like the following:
Tclass = Class of Tobject;
Var C : TClass;
Free is not a class method and hence cannot be called with a class reference.
Error: Only class methods can be accessed in class methods
This is related to the previous error. You cannot call a method of an object from inside a class method. The following code would produce this error:
class procedure tobject.x;
Because free is a normal method of a class it cannot be called from a class method.
You need to login before you can answer.