I am writing a component and this is the main class with the most important pieces of code:
TEquationSolver = class(TComponent)
property RootFindAlgorithm: TSolverType read FSolver write FSolver;
In the uses clauses I've added
Equation because inside
Equation.pas I have declared this kind of enum:
TSolverType = (TNewtonRaphson = 0, TSecant, TBisection, TBrent);
In this way I am able to have in the IDE an option in the Object Inspector with a dropdown menu.
I have installed the component and while I was testing I've found this problem:
procedure TForm1.Button1Click(Sender: TObject);
EquationSolver1.RootFindAlgorithm := TSolverType.Secant;
The error is the following:
[dcc32 Error] Unit1.pas(29): E2003 Undeclared identifier:
My question is very simple: why?
In the Unit where I am running the test (simple VCL form) there is the component with its uses included and so I am able to "see"
TEquationSolver. As you can see at the top inside the unit of TEquationSolver I have included
Equation and the latter has TSolverType.
The situation is the following:
Do I have to add something under the
uses somewhere? I don't want to add stuff to the
uses of Unit1.