Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2010-09

Getting rid of bogus form

5 messages · 3 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Bo Berglund

I made a mistake when trying out Lazarus for the first time....

Lazarus had created a form automatically on start (Form1).

I created a unit containing my wrapper for the com port, which I intend to use. It will contain a working thread to handle the actual in/out of data etc.

Then I decided to save the project and since I had focus on my com unit in the editor I just typed in comport as the name of the unit that was g?ing to be saved.

Then I realized that the form unit had been named comport! When the saving continued with the real comport unit I entered the same name in order to overwrite the file I created by mistake. This seemed to work so my next step was to go back to the form and do a SaveAs in order to rename it.

But no matter what I do it wouldn't allow me to save it under a new name....

So I closed it and created a new form instead and saved it with the name of my choosing.
But still there is a mysterious Form1 lingering on in my project options forms tab and I cannot get rid of it.

I removed the extra comport from the uses clause of the project file and also removed the line that creates it.
But it stays in my project properties anyway.
I also deleted files comport.lfm and comport.lrs and restarted Lazarus, but still my project properties show this Form1 as available....

How can I get rid of this ghost form for good?
(Where is the information of this form saved?)

BoB

Reply by email

Lee Jenkins
Bo Berglund wrote 45 lines
I made a mistake when trying out Lazarus for the first time.... Lazarus had created a form automatically on start (Form1). I created a unit containing my wrapper for the com port, which I intend to use. It will contain a working thread to handle the actual in/out of data etc. Then I decided to save the project and since I had focus on my com unit in the editor I just typed in comport as the name of the unit that was g?ing to be saved. Then I realized that the form unit had been named comport! When the saving continued with the real comport unit I entered the same name in order to overwrite the file I created by mistake. This seemed to work so my next step was to go back to the form and do a SaveAs in order to rename it. But no matter what I do it wouldn't allow me to save it under a new name.... So I closed it and created a new form instead and saved it with the name of my choosing. But still there is a mysterious Form1 lingering on in my project options forms tab and I cannot get rid of it. I removed the extra comport from the uses clause of the project file and also removed the line that creates it. But it stays in my project properties anyway. I also deleted files comport.lfm and comport.lrs and restarted Lazarus, but still my project properties show this Form1 as available.... How can I get rid of this ghost form for good? (Where is the information of this form saved?) -- BoB -- _______________________________________________ Lazarus mailing list http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply by email

Bo Berglund
to Lee Jenkins
> Bo Berglund wrote: > >> I made a mistake when trying out Lazarus for the first time....

I deleted the whole project and started fresh (after moving my comport unit) and now I'm OK.
Why struggle to understand when it is possible to just fix the problem?

Bo B

Reply by email

Mattias Gaertner
to Bo Berglund: I made a mistake when trying out Lazarus for the first time.... Lazarus had created a…
Show quoted text 35 lines
I made a mistake when trying out Lazarus for the first time.... Lazarus had created a form automatically on start (Form1). I created a unit containing my wrapper for the com port, which I intend to use. It will contain a working thread to handle the actual in/out of data etc. Then I decided to save the project and since I had focus on my com unit in the editor I just typed in comport as the name of the unit that was g?ing to be saved. Then I realized that the form unit had been named comport! When the saving continued with the real comport unit I entered the same name in order to overwrite the file I created by mistake. This seemed to work so my next step was to go back to the form and do a SaveAs in order to rename it. But no matter what I do it wouldn't allow me to save it under a new name.... So I closed it and created a new form instead and saved it with the name of my choosing. But still there is a mysterious Form1 lingering on in my project options forms tab and I cannot get rid of it. I removed the extra comport from the uses clause of the project file and also removed the line that creates it. But it stays in my project properties anyway. I also deleted files comport.lfm and comport.lrs and restarted Lazarus, but still my project properties show this Form1 as available.... How can I get rid of this ghost form for good? (Where is the information of this form saved?)

In the project inspector.

Mattias

Reply by email