View Issue Details

IDProjectCategoryView StatusLast Update
0018142LazarusIDEpublic2010-12-07 21:51
ReporterIan UptonAssigned ToVincent Snijders 
Status closedResolutionfixed 
Product Version0.9.29 (SVN)Product Build 
Target Version0.9.30Fixed in Version0.9.29 (SVN) 
Summary0018142: Problems selecting an event in IDE:Object Inspector

Environment: WinXP, SP3, Laz 0.9.9, FPC 2.4.3.

Moved from 0.29 27377 to 0.29 28559 hoping to address probems with TDBGrid.

Same project, no changes.
Compiles OK.

At design time in the IDE.
In the Object inspector, select an EVENT.
An error occurs as follows:

Unable to find the method. Please fix the error....

The error is "C:\lazarus\lcl\lclclasses.pp(32,10) Error: unit not found: Classes".

Efforts to fix this by adding paths to the Project>Project Options>Compler Options> paths (corrct place?) resulted in a a long string of errors at various

TagsNo tags attached.
Fixed in Revision28582
Attached Files


duplicate of 0017626 closedMattias Gaertner [regression] Fresh Lazarus installation fails to create events (e.g. OnClick) 


Vincent Snijders

2010-12-03 11:00

manager   ~0043920

Adding RTL source paths is (almost) never a solution and has side effects (compiled rtl units is more than one place).

Make sure you clean these up, before testing a newer snapshot.

Ian Upton

2010-12-03 21:41

reporter   ~0043965

Thanks for the response, everything tidied up, onwards.....


Ian Upton

2010-12-03 21:41

reporter   ~0043966

Thanks for the response, everything tidied up, onwards.....


Ian Upton

2010-12-04 04:41

reporter   ~0043971


Uninstalled LAZ 0.29 25626.

Installed LAZ 0.29 28602.
Installed packages for ZEOS, Unique Instance and a small arraybutton package.

Openned project - same problem in IDE, could not select an event in the object inspector.

Created a new project - single form one button same problem in IDE, could not select an event in the object inspector.

Vincent Snijders

2010-12-04 07:04

manager   ~0043973

What exact error message do you get?

What are the settings in the paths frame of the envirionment options.

In what directory did you install Lazarus?

Ian Upton

2010-12-04 09:31

reporter   ~0043974

Project is one form, one button.

In Object inspector
   Button1 : TButton;

In the 'events' tab click on the 'onclick' event.

I get the following message in a dialog box as follows:

  'Unable to find method. Please fix error shown in message box'.

In the message display

  'c:\lazarus\lclclasses.pp(32, 10) Error: Unit not found: Classes.

The file LCLClasses is open in the IDE with the following uses line highlighted in brown:

  Classes, WSLCLClasses, WSReferences, LCLType, LCLProc;

Lazarus install is DEFAULT.

A screen print of the environment variables is attached.


2010-12-04 09:35 (67,766 bytes)

Ian Upton

2010-12-04 20:51

reporter   ~0043993

I operate with VMWare virtual machines.

Generally if I update Lazarus I copy a base WinXP with nothing on it and then instal Lazarus, packages, FireBird, etc.

Moved the project back to the VM with 0.29 27377.

Can click on object inspector>object.event and code is generated correctly.
This would imply that there is othing wrong with the project.

Lazarus environment is always the same, default.



Vincent Snijders

2010-12-04 22:32

manager   ~0043996

I will think about further tests.

2010-12-05 22:53 (255,845 bytes)

Ian Upton

2010-12-05 22:56

reporter   ~0044017

I have uploaded a zip of the project source.

Unzip into c:\projects\lazarus\test-frame.

Add a button to any form, try and add an event such as 'onclick'.


Ian Upton

2010-12-06 11:48

reporter   ~0044036


I have just noticed that I can cause this prblem simply as follows:

In the code editor on any form enter an unknown symbol, for exapmle 'fred'.

Right click on 'fred' and then click on 'find declaration'.

Voila the cant find 'Classes' error.


Mattias Gaertner

2010-12-06 12:07

manager   ~0044037

Last edited: 2010-12-06 12:24

Check your fpc source directory in the environment options.
Then Environment / Rescan FPC directory.

Vincent Snijders

2010-12-06 12:17

manager   ~0044038

Choose View -> IDE Internals -> About IDE.

Copy the Lazarus version and build information and the Global IDE options into this bug report.

Ian Upton

2010-12-06 19:23

reporter   ~0044046


Performed the environment.rescan fpc directory. Problem resolved, get unknown symbol on a right click and find decleration on 'fred', can create object event code bu clicing on object.event in the object inspector.

Thanks for the pointer.

View.ide internals.about ide (unfortunately after performing the rescan). Will create another vm and do a fresh install and will post another view.ide.internals...

Will post it here.

Thanks, Ian

Lazarus version: 0.9.29
Lazarus svn revision: 28602
Lazarus build date: 2010/12/03
Lazarus was compiled for i386-win32
Lazarus was compiled with fpc 2.4.3

Global IDE options:
Primary config directory=C:\Documents and Settings\Ian Upton\Local Settings\Application Data\lazarus
Secondary config directory=C:\lazarus
Real CompilerFilename=C:\lazarus\fpc\2.4.3\bin\i386-win32\fpc.exe
FPC source directory=$(LazarusDir)fpc\$(FPCVer)\source\
Real FPC source directory=C:\lazarus\fpc\2.4.3\source\
Test directory=C:\DOCUME~1\IANUPT~1\LOCALS~1\Temp\

Environment variables:
ALLUSERSPROFILE=C:\Documents and Settings\All Users=
APPDATA=C:\Documents and Settings\Ian Upton\Application Data=
CommonProgramFiles=C:\Program Files\Common Files=
HOMEPATH=\Documents and Settings\Ian Upton=
PROCESSOR_IDENTIFIER=x86 Family 6 Model 15 Stepping 6, GenuineIntel=
ProgramFiles=C:\Program Files=
USERPROFILE=C:\Documents and Settings\Ian Upton=

Ian Upton

2010-12-07 00:47

reporter   ~0044050


Not Good news......

Created a new VM, installed laz 9.29 28602.

Tried the undefined symbol 'fred', right click and then 'find decleration', in the default 'project', got a message about 'fred' being undefined (correct).

Installed packages, ZEOS, UniqueInstance and the button Array.

Tried the 'fred' test, all OK.

Loaded my project.

Tried the 'fred' test, all OK.

As on the previous VM I had installed 28602 over 28559 I thought 28559 may have been the problem I created another VM.

Installed lax 9.29 28559. Performed all the above package loads and tests. 'fred' was allways defined.

Therefore my problem has gone away. Whatever was wrong was fixed by the environment.rescan fpc in one VM and did not occur on two subsequent VMs and lazarus installs I created.

I have no idea what may have caused the problem.
The WinXP is allways a copy of one 'base' system.
I allways take the default lazarus install choices (no icon on the task bar, icon on the desktop).

thanks for the support, apologies for any inconvenience.

Vincent Snijders

2010-12-07 08:00

manager   ~0044056

You may close this issue.

Issue History

Date Modified Username Field Change
2010-12-03 10:52 Ian Upton New Issue
2010-12-03 10:52 Ian Upton Widgetset => Win32/Win64
2010-12-03 11:00 Vincent Snijders Fixed in Revision => 28582
2010-12-03 11:00 Vincent Snijders LazTarget => -
2010-12-03 11:00 Vincent Snijders Relationship added duplicate of 0017626
2010-12-03 11:00 Vincent Snijders Duplicate ID 0 => 17626
2010-12-03 11:00 Vincent Snijders Status new => resolved
2010-12-03 11:00 Vincent Snijders Fixed in Version => 0.9.29 (SVN)
2010-12-03 11:00 Vincent Snijders Resolution open => duplicate
2010-12-03 11:00 Vincent Snijders Assigned To => Vincent Snijders
2010-12-03 11:00 Vincent Snijders Note Added: 0043920
2010-12-03 21:41 Ian Upton Note Added: 0043965
2010-12-03 21:41 Ian Upton Note Added: 0043966
2010-12-03 21:42 Ian Upton Status resolved => closed
2010-12-04 04:41 Ian Upton Status closed => assigned
2010-12-04 04:41 Ian Upton Resolution duplicate => reopened
2010-12-04 04:41 Ian Upton Note Added: 0043971
2010-12-04 07:04 Vincent Snijders Note Added: 0043973
2010-12-04 07:04 Vincent Snijders Status assigned => feedback
2010-12-04 09:31 Ian Upton Note Added: 0043974
2010-12-04 09:35 Ian Upton File Added:
2010-12-04 20:51 Ian Upton Note Added: 0043993
2010-12-04 22:32 Vincent Snijders Note Added: 0043996
2010-12-04 22:33 Vincent Snijders LazTarget - => 0.9.30
2010-12-04 22:33 Vincent Snijders Status feedback => assigned
2010-12-04 22:33 Vincent Snijders Target Version => 0.9.30
2010-12-05 22:53 Ian Upton File Added:
2010-12-05 22:56 Ian Upton Note Added: 0044017
2010-12-06 11:48 Ian Upton Note Added: 0044036
2010-12-06 12:07 Mattias Gaertner Note Added: 0044037
2010-12-06 12:17 Vincent Snijders Note Added: 0044038
2010-12-06 12:17 Vincent Snijders Status assigned => feedback
2010-12-06 12:24 Mattias Gaertner Note Edited: 0044037
2010-12-06 19:23 Ian Upton Note Added: 0044046
2010-12-06 21:07 Vincent Snijders Status feedback => resolved
2010-12-06 21:07 Vincent Snijders Resolution reopened => fixed
2010-12-06 21:07 Vincent Snijders Duplicate ID 17626 => 0
2010-12-07 00:47 Ian Upton Note Added: 0044050
2010-12-07 08:00 Vincent Snijders Note Added: 0044056
2010-12-07 21:51 Ian Upton Status resolved => closed