Sign in Join

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

Mailing lists / lazarus / 2016-09

Can't add new form to Lazarus App

9 messages · 5 people · –

Reply by email Subscribe to this list Your subscription

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

Terry A. Haimann

On an old Lazarus app (Linux) today I tried to add a form and got the following:

http://www.haimann.us/Images/Test.png

After selecting this option, the new form appears messed up. At the botton of the unit.pas file the following is displayed:

initialization
  {$I unit1.lrs}

Even after I save the unit under another name. After compilation when the form is displayed via a show.modal, the form is blank. Is there someway to repair this app

Reply by email

Mattias Gaertner
to Terry A. Haimann
On an old Lazarus app (Linux) today I tried to add a form and got the

Do you mean add a new empty form or add an existing form?

I recommend to adapt the $mode and $H directive in the main source (usually projectname.lpr).

After selecting this option, the new form appears messed up.

What means messed up? It's an empty form, isn't it?

Show quoted text 9 lines
At the botton of the unit.pas file the following is displayed: initialization {$I unit1.lrs} Even after I save the unit under another name. After compilation when the form is displayed via a show.modal, the form is blank. Is there someway to repair this app

How do you create the form?

Mattias

Reply by email

Terry A. Haimann
to Mattias Gaertner
Mattias Gaertner wrote 6 lines
On Wed, 28 Sep 2016 16:49:15 -0500 "Terry A. Haimann via Lazarus" wrote: > On an old Lazarus app (Linux) today I tried to add a form and got the Do you mean add a new empty form or add an existing form?

A new form.

Show quoted text 12 lines
> following: > > http://www.haimann.us/Images/Test.png I recommend to adapt the $mode and $H directive in the main source (usually projectname.lpr). > After selecting this option, the new form appears messed up. What means messed up? It's an empty form, isn't it?

The new form and it's source will not compile unless i comment out the:

{$I unit1.lrs}

I tried renaming unit1 to the new unit name, but it did not like the lrs file. It refused to compile.

Show quoted text 15 lines
> At the > botton of the unit.pas file the following is displayed: > > initialization > {$I unit1.lrs} > > Even after I save the unit under another name. After compilation when > the form is displayed via a show.modal, the form is blank. > Is there someway to repair this app How do you create the form? Mattias

Reply by email

Mattias Gaertner
to Terry A. Haimann
Show quoted text 9 lines
[...] > What means messed up? It's an empty form, isn't it? The new form and it's source will not compile unless i comment out the: {$I unit1.lrs} I tried renaming unit1 to the new unit name, but it did not like the lrs file. It refused to compile.

How did you create the form?
Can you post the first few lines of the unit1.lrs?

Mattias

Reply by email

Terry A. Haimann
to Mattias Gaertner
Mattias Gaertner wrote 17 lines
On Thu, 29 Sep 2016 05:59:49 -0500 "Terry A. Haimann" wrote: >[...] > > What means messed up? It's an empty form, isn't it? > > The new form and it's source will not compile unless i comment out the: > > {$I unit1.lrs} > > I tried renaming unit1 to the new unit name, but it did not like the lrs > file. It refused to compile. How did you create the form? Can you post the first few lines of the unit1.lrs? Mattias

I created the form by clicking on NewForm and then I tried to rename it from the Object Inspector. I am running Lazarus 1.2.4 This app has probably been used by several versions of Lazarus.

Terry

It renamed it to the new filename:

{ This is an automatically generated lazarus resource file }

LazarusResources.Add('TStRschForm','FORMDATA',[

'TPF0'#11'TStRschForm'#10'StRschForm'#4'Left'#3#235#0#6'Height'#3#240#0#3'Top'

+#3#145#0#5'Width'#3#250#2#7'Caption'#6#10'StRschForm'#12'ClientHeight'#3#240

+#0#11'ClientWidth'#3#250#2#10'LCLVersion'#6#7'1.2.4.0'#0#6'TLabel'#6'Label1'

+#4'Left'#2#24#6'Height'#2#15#3'Top'#2#30#5'Width'#2#23#7'Caption'#6#4'Test' +#11'ParentColor'#8#0#0#0
]);

Reply by email

Mattias Gaertner
to Terry A. Haimann
Show quoted text 41 lines
On Thu, 2016-09-29 at 13:17 +0200, Mattias Gaertner via Lazarus wrote: > On Thu, 29 Sep 2016 05:59:49 -0500 > "Terry A. Haimann" wrote: > > >[...] > > > What means messed up? It's an empty form, isn't it? > > > > The new form and it's source will not compile unless i comment out the: > > > > {$I unit1.lrs} > > > > I tried renaming unit1 to the new unit name, but it did not like the lrs > > file. It refused to compile. > > How did you create the form? > Can you post the first few lines of the unit1.lrs? > > Mattias I created the form by clicking on NewForm and then I tried to rename it from the Object Inspector. I am running Lazarus 1.2.4 This app has probably been used by several versions of Lazarus. Terry It renamed it to the new filename: { This is an automatically generated lazarus resource file } LazarusResources.Add('TStRschForm','FORMDATA',[ 'TPF0'#11'TStRschForm'#10'StRschForm'#4'Left'#3#235#0#6'Height'#3#240#0#3'Top' +#3#145#0#5'Width'#3#250#2#7'Caption'#6#10'StRschForm'#12'ClientHeight'#3#240 +#0#11'ClientWidth'#3#250#2#10'LCLVersion'#6#7'1.2.4.0'#0#6'TLabel'#6'Label1' +#4'Left'#2#24#6'Height'#2#15#3'Top'#2#30#5'Width'#2#23#7'Caption'#6#4'Test' +#11'ParentColor'#8#0#0#0 ]);

Ok. So it is *not* an empty form.

Please post the whole unit and the compiler error you get.

Mattias

Reply by email

brian
to Maxim Ganetsky
Maxim Ganetsky wrote 6 lines
29.09.2016 22:26, Terry A. Haimann via Lazarus ?????: > I created the form by clicking on NewForm and then I tried to rename it > from the Object Inspector. I am running Lazarus 1.2.4 This app has Lazarus 1.2.4? Is it a joke?

This is straying from the point, but anybody who has worked for a LARGE (probably governmental) bureaucracy is likely to be all too familiar with being forced to use out-of-date software. Performing 'unapproved' upgrades may well mean disciplinary proceedings. Yes, I've had to work under those conditions. :(

I completely understand the logic for the Lazarus developers wanting to know whether a problem can be reproduced with the latest version. You just have to remember that some people aren't allowed to use that version, as much as they would like to do so.

Brian.

Reply by email

Bad Sector
brian wrote 23 lines
On Fri, 30 Sep 2016 00:38:39 +0300, Maxim Ganetsky wrote: > 29.09.2016 22:26, Terry A. Haimann via Lazarus ?????: >> I created the form by clicking on NewForm and then I tried to rename it >> from the Object Inspector. I am running Lazarus 1.2.4 This app has > > Lazarus 1.2.4? Is it a joke? > This is straying from the point, but anybody who has worked for a LARGE (probably governmental) bureaucracy is likely to be all too familiar with being forced to use out-of-date software. Performing 'unapproved' upgrades may well mean disciplinary proceedings. Yes, I've had to work under those conditions. :( I completely understand the logic for the Lazarus developers wanting to know whether a problem can be reproduced with the latest version. You just have to remember that some people aren't allowed to use that version, as much as they would like to do so. Brian.

Also Lazarus/LCL and Free Pascal APIs aren't exactly stable between releases as with every release of both Lazarus and Free Pascal you have things that change and/or break (the string API changes are a recent big one, but many other things change every release).

It shouldn't be surprising when people want to stick with some version for a long time to avoid gotchas. Also when making branched releases you may want to keep the version of the tools you used at that release time around in case you want to do fixes later on that branch.

Reply by email