Recent

Author Topic: Class "TStatusBar" not found  (Read 4678 times)

putu swastawa

  • Newbie
  • Posts: 2
Class "TStatusBar" not found
« on: September 22, 2013, 11:11:14 am »
Hi,

I had strange error with message Class "TStatusBar" not found.

My application consist of main-form and some child form. Main form did not give this error, also some of child form. I had try to erase TStatusBar and comctrls from lfm and pas files of this unit, clean precompiled unit, and recompile again, but this effort has no result.

As my experience on Delphi, I just erase precompiled unit and recompile my application, it will erase the error.

I use Lazarus 1.0.10 with fpc 2.6.2.

please help me.

howardpc

  • Hero Member
  • *****
  • Posts: 4144
Re: Class "TStatusBar" not found
« Reply #1 on: September 22, 2013, 01:18:52 pm »
Somewhere in your project there is still a reference to TStatusBar.
As well as checking all the sources (*.lfm, *.pas/.pp, .lpr) there may be a hidden reference in a .ppu somewhere.
The option in the Run menu called Clean up Build Files may help you get rid of an obsolete reference.
Or you can manually delete all .o, .or and .ppu files associated with your project so they will be regenerated. In a default installation you'll find these in a subdirectory of your project's /lib/ (or \lib\) subdirectory.
As you realise, you can also remove ComCtrls if it appears in any uses clause (unless you need it for some other component of course), though by itself this will not correct your difficulty.
« Last Edit: September 22, 2013, 01:26:00 pm by howardpc »

putu swastawa

  • Newbie
  • Posts: 2
Re: Class "TStatusBar" not found
« Reply #2 on: September 22, 2013, 01:58:37 pm »
Hi, howardpc, Thanks for your reply.

I had found the problem after a day get head ache for this error. one of my form different on object declaration in lfm file and in pas file. while compile it, FPC can not detect this differentiation, and so compilation done without error. The error comes when i try to run my application. May be it is one of FPC bug.

Thanks.

howardpc

  • Hero Member
  • *****
  • Posts: 4144
Re: Class "TStatusBar" not found
« Reply #3 on: September 22, 2013, 02:57:07 pm »
I've found that where a discrepancy arises between a .pas form unit and its corresponding .lfm form file it is usually best to begin again, either from a backup saved before the error occurred, or by judicious copying of source into a new project.

 

TinyPortal © 2005-2018