Hi There, (Newbie here),
I have a relatively simple Form, and I'm trying to add an event hook. The form only has one Control, an OpenGLControl. The moment I hit the ellipsis next to the event name (e.g. OnKeyPress) in the Form: Events tab in the Object Inspector, I instantly get
Codetools, errors: 1
unit1.pas(11,30) Error: unit not found: OpenGLContext
If I test it by deleting that unit from the uses clause, the error jumps to the error before that, uPSComponent. If I remove that, I get the error that it can't find the unit ExtCtrls... And so on and so forth until I get back to removing the uses for "Forms" at which point I get other errors because the main class is a Form, as you'd expect. Here's my "uses" list that's added automagically by Laz...
uses
Classes, SysUtils, Forms, Controls, Graphics, Dialogs, ComCtrls, ExtCtrls,
uPSComponent, OpenGLContext, gl;
Now, I can (sometimes) resolve the problem by reversing the uses of OpenGLContext and "gl" at the end there. But it usually doesn't help. If the code didn't compile I'd say there was a problem with my code... But it does compile, so I'm totally stumped.
Can anyone tell me why it's doing that... if only for my own sanity, it's been hindering me all evening till I just figured out the gl/OpenGLContext ordering.
Lazarus 2.2.0
Linux Mint 21.2
fpc 3.2.2+dfsg-9ubuntu1
everything else vanilla.
Many thanks in advance,
Nick