Forum > Beginners

Ghost of a Frame?

<< < (2/2)

BigChimp:

--- Quote from: William Marshall on October 20, 2014, 01:25:37 am ---JuhaManninen: What's "trunk"?

--- End quote ---
The latest development version.

Lazarus code is stored in a source code version control system, subversion, which has a "trunk" and various "branches". The trunk is the newest code; whenever releases are made, they split off into branches (e.g. Lazarus 1.2). Each branch can receive fixes etc so new subreleases can be made (1.2.2, 1.2.4, 1.2.6...).

howardpc:

--- Quote from: William Marshall on October 20, 2014, 01:25:37 am ---howardpc: I really am a complete newbie, but I have written a fair amount of code for this project.  Do I really have to delete it all and
start again?

--- End quote ---

Perhaps not. There are always several ways to skin a cat.
First it may be that Never's suggestion (click on the Component Palette selection arrow icon when the project opens) may cure the problem.

If that does not help, try editing your project's main .lpr file, if it contains a reference to the ghost frame. Did you originally create a frame (File->New->Frame, OK) ? You edit this file via Project->View Project source.
If so it will look something like this:

--- Code: ---program project1;

{$mode objfpc}{$H+}

uses
  {$IFDEF UNIX}{$IFDEF UseCThreads}
  cthreads,
  {$ENDIF}{$ENDIF}
  Interfaces, // this includes the LCL widgetset
  Forms, Unit1, Unit2
  { you can add units after this };

{$R *.res}

begin
  RequireDerivedFormResource := True;
  Application.Initialize;
  Application.CreateForm(TForm1, Form1);
  Application.Run;
end.

--- End code ---
Look at the uses clause. Your project may have numerous units. In this example the "Unit2" (or whatever applies in your case) in the uses clause is the name of the frame unit. If you have such a frame unit specified here, simply delete it.

You probably have a backup of your work saved in a \backup directory (depending on your Lazarus settings, but it is there by default). If so, restoring a backup may get you going again, provided it comes from a time before the frame incident.

Failing that, start a new empty project, and add components until its main form matches what you want. You can copy and paste any other forms and/or units needed from your original project (both .pas and .lfm will be needed for forms). You'll have to adjust the main form's uses clause to reflect these new hand-added units.

Never:
@William Marshall
if you delete it already add one again
and click on the arrow immediately after you add it
I know it sounds *scrambled* but this is what worked for me

Edit :*** except this trick with the arrow when you add a new frame
 frames are responding as expected

William Marshall:
Thank you all again for your help.  Never turns out to be the hero here.  I hadn't noticed that the Component Palette selection arrow wasn't
highlighted, so the Frame button was apparently on permanently.  Clicking the arrow fixed the problem.  I hope other problems I will have
(I'm sure there will be many) will be solved so easily, though with less near-panic on my part.
Again, many thanks to all of you.

Never:
@JuhaManninen just test it with trunk the behavior is the same as mentioned from @William Marshall

Navigation

[0] Message Index

[*] Previous page

Go to full version