[lazarus] Unit not found objpas - but only sometimes

Mattias Gaertner nc-gaertnma at netcologne.de
Tue Dec 23 18:50:03 EST 2003


On Tue, 23 Dec 2003 10:21:12 +0200  "A.J. Venter" <ajventer at direqlearn.org>
wrote:

> Hi all, thanks for all the help with the previous issues.
> 
> Now a new issue has reared it's ugly head.
> 
> When I am working on buttons already in the existing code, I can modify
> their OnClick methods no problem.
> However, I cannot add any buttons. I add a button, I go to events,
> double click in OnClick and get a message: Cannot find method.
> The message window shows: Unit not found objpas.

FYI: The reason, why the codetools can find your existing onclick, but not
the objpas, is that they do not compile like fpc. They parse and search
units on the fly. This feature is important for speed and to work with code
under construction.

 
> This is equally true of new buttons in existing and new forms.
> 
> Any idea what is causing this or how to fix it ?

- Maybe the IDE didn't notice, that you updated your fpc. Try Environment ->
Rescan fpc source dir.
- If this does not work, check if the IDE actually found the objpas unit.
There are quite a lot of fpc units, so the easiest way is to grep in
~/.lazarus/inputhistory.xml for objpas.
For fpc 1.9 there should be a line

objpas <your fpc src path>/rtl/objpas/objpas.pp

Is it there?


Mattias






More information about the Lazarus mailing list