Recent

Author Topic: "Unable to find component class TFrame1..."  (Read 4204 times)

wp

  • Hero Member
  • *****
  • Posts: 11854
"Unable to find component class TFrame1..."
« on: February 03, 2013, 04:39:53 pm »
When preparing the demo for another posting (http://www.lazarus.freepascal.org/index.php/topic,19774.0.html) I came across an issue with frames that I have not seen before:
  • Create a new application
  • Save unit and project
  • Create a new frame
  • Add controls to the frame
  • Save the frame
  • Go back to the main unit, insert the frame
  • Save - everything is well so far
  • Close Lazararus, restart and load this project. There is an error message saying that "Unable to find component class "TFrame1". It is not registered via RegisterClass and no lfm was found. It is needed by unit ...\unit1.pas."
  • The lfm does exist where it is expected, and clicking on any of the three buttons on the messagebox continues loading the project such that it can be compiled without any error.
I am working on Win32 with the recent svn trunk of Laz1.1. Using my other installation with Lazarus 1.0 does not show the issue.

Also, when the frame is created at runtime, the form loads, compiles and runs fine without an error message.

Am I doing something wrong, or is this a recently-introduced bug?

Blaazen

  • Hero Member
  • *****
  • Posts: 3237
  • POKE 54296,15
    • Eye-Candy Controls
Re: "Unable to find component class TFrame1..."
« Reply #1 on: February 03, 2013, 05:45:43 pm »
Isn't it a missing path to frame?
I mean the case you saved frame to some subdirectory and you have to add the path to Project Options - > Compiler Options -> Paths.
Also, is the frame in Project Inspector?

You could check uses section of the *.lpr file too.
« Last Edit: February 03, 2013, 05:48:34 pm by Blaazen »
Lazarus 2.3.0 (rev main-2_3-2863...) FPC 3.3.1 x86_64-linux-qt Chakra, Qt 4.8.7/5.13.2, Plasma 5.17.3
Lazarus 1.8.2 r57369 FPC 3.0.4 i386-win32-win32/win64 Wine 3.21

Try Eye-Candy Controls: https://sourceforge.net/projects/eccontrols/files/

wp

  • Hero Member
  • *****
  • Posts: 11854
Re: "Unable to find component class TFrame1..."
« Reply #2 on: February 03, 2013, 06:49:16 pm »
The frame is in the same directory as the entire project, and it is in the Project Inspector. See the demo referenced to in the first posting

 

TinyPortal © 2005-2018