Forum > Databases

Unable to find the component TDataSource with Lazarus 2.2

(1/2) > >>

tintinux:
Hi

When loading a .lfm, I get this message :

Unable to find the component class "TDatasource".
It is not registered via RegisterClass and no lfm was found.
It is needed by unit:  (the unit I load)

This occurs with Lazarus 2.2, not with 2.0.x I used previously.
Other .lfm in my project contain a visual TDataSource and load without problem.

What should I check or change ?
Thanks

HeavyUser:
1) open the components dialogue/palette and see if the tdatasource is listed in there to rule out something wrong with your installation.
2) compress and attach the problematic unit and its lfm so we can take a look.

I'm assuming some short of problem with the type name where the letters might look the same but are comprised from the English letters expected, it can happen after a manual editing of the lfm or the pas file.

You can try to manually delete the component from the lfm and unit and re-add it anew.

tintinux:
Hi

The TDataSource is present in the palette and looks correctly installed. Other similar units having a TDataSource in the .lfm load without problem.

The .pas and .lfm are attached. The .lfm was renamed to .lfm.txt since this forum doesn't allow .lfm uploads  %)

The full project is Gestinux/trunk and can be found on SourceForge.

Nicole:
in doubt, do this:

Right click to the white area of your components, choose "show all". There you can key in anything which tries to hide away. Like "datasource".

HeavyUser:
Sorry, I do not see anything wrong with your files. It should work.
The only thing I can think off to do, is to open the lfm in a text editor and delete the datasource from it (all 4 lines), also delete it from the pas file and see if that opens the form correctly.
If it does, then add it again.

Navigation

[0] Message Index

[#] Next page

Go to full version