Recent

Author Topic: Lazarus 1.8.4 IDE/editor problems  (Read 1514 times)

fcs

  • New member
  • *
  • Posts: 6
Lazarus 1.8.4 IDE/editor problems
« on: March 11, 2019, 10:16:39 pm »
Hello,

I'm testing Lazarus 1.8.4 (source code of some components doesn't work on 2.0 version) as an alternative to Delphi (BDS2006-XE4).

The problems are:

1. When I use "Close All" option, files in editor closes, but when I press F9, the compilation of last project starts. In BDS close all file makes editor empty and closes the project too. Do I do something wrong ?

2. Each time I run Lazarus it starts with an empty or default project. How to prevent this situation ?

3. When I open an existing project, editor is empty. I have to use "View project source code" to see first tab in the editor. Before closing, the unit cards were opened in the editor. How properly close the project to save information of opened units in tabs ?

4. I set my own colors and font for editor. In editor the settings work well, but when I open identifier completion (Ctrl+Space), the colors and fonts are probably inherited from editor, and in my case doesn't look good (fonts are to big and colors are I don't know where from). In BDS the colors and fonts for editor and the identifier completion are different. Is the way to set font size and colors for the  identifier completion window ?

Regards
Michal




Blaazen

  • Hero Member
  • *****
  • Posts: 2782
  • POKE 54296,15
    • Eye-Candy Controls
Re: Lazarus 1.8.4 IDE/editor problems
« Reply #1 on: March 11, 2019, 10:26:22 pm »
AFAIK Lazarus is designed to work with just one and only one project. Even if you close all files.

There is option "Open last project and packages at start" in Project Options ... > Environment > Files.
Lazarus 2.1.0 r59757M FPC 3.3.1 r40507 x86_64-linux-qt Chakra, Qt 4.8.7/5.11.2, Plasma 5.14.2
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/

dbannon

  • Hero Member
  • *****
  • Posts: 600
    • tomboy-ng, a rewrite of the classic Tomboy
Re: Lazarus 1.8.4 IDE/editor problems
« Reply #2 on: March 11, 2019, 11:54:16 pm »
1. When I use "Close All" option, files in editor closes, but when I press F9, the compilation of last project starts. In BDS close all file makes editor empty and closes the project too. Do I do something wrong ?

2. Each time I run Lazarus it starts with an empty or default project. How to prevent this situation ?

3. When I open an existing project, editor is empty. I have to use "View project source code" to see first tab in the editor. Before closing, the unit cards were opened in the editor. How properly close the project to save information of opened units in tabs ?


My 'work flow' when finished for the day is to leave all editor files open, click Project, close project. Then exit from the resulting dialog. When I reopen Lazarus, I am asked which project I want and all is restored to where I was when I closed (which ever project I've chosen).


4. I set my own colors and font for editor. In editor the settings work well, but when I open identifier completion (Ctrl+Space), the colors and fonts are probably inherited from editor, and in my case doesn't look good (fonts are to big and colors are I don't know where from). In BDS the colors and fonts for editor and the identifier completion are different. Is the way to set font size and colors for the  identifier completion window ?

Sorry, I'm a bloke, I don't "do colours" ....

Davo
Lazarus 1.8, Linux (and reluctantly Win10, OSX)
My Project - https://github.com/tomboy-notes/tomboy-ng

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 5515
    • wiki
Re: Lazarus 1.8.4 IDE/editor problems
« Reply #3 on: March 12, 2019, 12:02:39 am »
(1) "Close all" only closes, the (unit or text) files. The project stays open.

In Lazarus you always have to have a project open. (It just was designed that way a very long time ago, and to change it now would require rewrite of large parts of the IDE)

You can close the project from the project menu. But it will force you to open another project immediately (or close the IDE).

(2) Hence when you start Lazarus, either the last project can be re-opened, or an empty project has to be open.

(3) If you did "close all files" then the IDE may remember that no editor was open, so it will start a new project like this.
If you close a project with it's files open in the editor, then next time you open that project you should see editors right away.

(4) Not sure about 1.8.4, but in 2.0.0 (some of) those colors can be set.
On the color page for the editor, scroll down the tree with the color-elements. There is a section "Identifier Completion"

fcs

  • New member
  • *
  • Posts: 6
Re: Lazarus 1.8.4 IDE/editor problems
« Reply #4 on: March 12, 2019, 12:21:34 pm »
Hello,

You are right.

My mistake was choosing "close all" instead of "close project"  (in BDS there in no option "Close project").

Quote
(4) Not sure about 1.8.4, but in 2.0.0 (some of) those colors can be set.
On the color page for the editor, scroll down the tree with the color-elements. There is a section "Identifier Completion"

In Lazarus 1.8.4 there are no options for color settings for "Identifier Completion", they are in Lazarus 2.0, but there is no option for set font style for this window.

Thank you for your help.

Michal

JuhaManninen

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3611
  • I like bugs.
Re: Lazarus 1.8.4 IDE/editor problems
« Reply #5 on: March 12, 2019, 01:32:05 pm »
My mistake was choosing "close all" instead of "close project"  (in BDS there in no option "Close project").
What does BDS mean in this context? Lazarus should behave identically on every system.

lucamar

  • Hero Member
  • *****
  • Posts: 1943
Re: Lazarus 1.8.4 IDE/editor problems
« Reply #6 on: March 12, 2019, 02:04:13 pm »
What does BDS mean in this context? Lazarus should behave identically on every system.

BDS = Borland Development Studio
Turbo Pascal 3 CP/M - Amstrad PCW 8256 (512 KB !!!) :P
Lazarus 2.0.2/2.0.4  - FPC 3.0.4 on:
(K|L)Ubuntu 12..16, Windows XP SP3, various DOSes.

fcs

  • New member
  • *
  • Posts: 6
Re: Lazarus 1.8.4 IDE/editor problems
« Reply #7 on: March 12, 2019, 02:25:14 pm »
Hello,

Yes, BDS = Borland Development Studio

Regards
Michal

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 5515
    • wiki
Re: Lazarus 1.8.4 IDE/editor problems
« Reply #8 on: March 12, 2019, 03:49:06 pm »
What style do you want to set?

It uses bold already to mark the token within each line. e.g.: property Foo: Integer



fcs

  • New member
  • *
  • Posts: 6
Re: Lazarus 1.8.4 IDE/editor problems
« Reply #9 on: March 12, 2019, 05:17:03 pm »
Hi,

I know. I have set font Fixedsys to 15 for editor, but it does not look good in the completion window. Especially that it is not raster font.
In BDS these fonts are different.

Is it possible to set it somewhere in the source code of Lazarus and then recompile Lazarus IDE ?

Regards
Michal

lucamar

  • Hero Member
  • *****
  • Posts: 1943
Re: Lazarus 1.8.4 IDE/editor problems
« Reply #10 on: March 12, 2019, 05:28:48 pm »
Fixedsys is a raster console fallback font: Don't use it for your editor! Even Courier New is better ;)
Turbo Pascal 3 CP/M - Amstrad PCW 8256 (512 KB !!!) :P
Lazarus 2.0.2/2.0.4  - FPC 3.0.4 on:
(K|L)Ubuntu 12..16, Windows XP SP3, various DOSes.

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 5515
    • wiki
Re: Lazarus 1.8.4 IDE/editor problems
« Reply #11 on: March 12, 2019, 05:37:44 pm »
I know. I have set font Fixedsys to 15 for editor, but it does not look good in the completion window. Especially that it is not raster font.
In BDS these fonts are different.

Is it possible to set it somewhere in the source code of Lazarus and then recompile Lazarus IDE ?

So it does look good (to you) in the editor itself, but it does not look good in the dropdown?
Shouldn't the font look the same? Maybe a picture?

The drawing is done in ide/sourceEditorProcs




fcs

  • New member
  • *
  • Posts: 6
Re: Lazarus 1.8.4 IDE/editor problems
« Reply #12 on: March 12, 2019, 05:52:29 pm »
Hi,

This is a matter of habit. I've been using this font in Delphi for 15 years. ;)

Regards
Michal

440bx

  • Hero Member
  • *****
  • Posts: 1051
Re: Lazarus 1.8.4 IDE/editor problems
« Reply #13 on: March 12, 2019, 05:54:14 pm »
I know. I have set font Fixedsys to 15 for editor, but it does not look good in the completion window. Especially that it is not raster font.
A good font is a find.

You'll find some really good programming fonts at this page (along with sample preview) https://www.codeproject.com/Articles/30040/Font-Survey-of-the-Best-Monospaced-Programming?msg=2763946 choose one you like (try a few!).  Almost guaranteed you'll find something there you'll like a lot better than fixedsys.

ETA:

Borland used to ship a font called BorTE.   It is a raster font and it is a rather nice programming font (particularly when set to bold, IMO)
« Last Edit: March 12, 2019, 05:56:54 pm by 440bx »
using FPC v3.0.4 and Lazarus 1.8.2 on Windows 7 64bit.

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 5515
    • wiki
Re: Lazarus 1.8.4 IDE/editor problems
« Reply #14 on: March 12, 2019, 06:19:06 pm »
I know. I have set font Fixedsys to 15 for editor, but it does not look good in the completion window. Especially that it is not raster font.

So you want to use an entirely different font, or use FixSys but make all bold, or make none bold?

Anyway see my last post, you can hard code it.

If it is about bold on/off, and you want to contribute a patch to make it configurable, we can discuss how this could be done.