Recent

Author Topic: Lazarus Release Candidate 1 of 1.2  (Read 139272 times)

BlueIcaro

  • Hero Member
  • *****
  • Posts: 792
    • Blog personal
Re: Lazarus Release Candidate 1 of 1.2
« Reply #60 on: December 04, 2013, 04:48:52 pm »
Hi, in Lazaris 1.0.14, has the same function as you say.

If you close the Form1, the event OnClose of Form2 are not call, insted is call OnDestroy event.

I think it's a feature. I don't know why. I think some advanced programer can explain it.

/BlueIcaro
« Last Edit: December 04, 2013, 04:51:58 pm by BlueIcaro »

howardpc

  • Hero Member
  • *****
  • Posts: 4144
Re: Lazarus Release Candidate 1 of 1.2
« Reply #61 on: December 04, 2013, 06:25:28 pm »
When I close Form2 first, the onClose event fires normally
When I close the application by closing Form1 first, the onCLose event of Form2 does not fire.
The onDestroy does fire though, so it's not a disaster.
Is this a bug, or a feature?

It is neither a bug nor a feature, but simply the event doing (or not doing) what its name indicates.
Closing the main form of a Lazarus GUI application terminates the application. You trigger the OnClose event of Form1 by closing it. But you have done nothing with Form2. Its OnClose event can be triggered either by the user closing it, or in code if you the programmer call Form2.Close somewhere. Otherwise nothing else calls Form2's OnClose behind your back.
The Application instance does call Form2.Free, however, when the main form is closed because of the Delphi/Lazarus automatic freeing of all owned components. This is a feature, a great boon which saves you writing a lot of tedious housekeeping component-destruction-code yourself to dispose of all the memory allocations made when all your GUI forms and controls were first constructed at application start-up.

László Körössy

  • Newbie
  • Posts: 2
Re: Lazarus Release Candidate 1 of 1.2
« Reply #62 on: December 05, 2013, 09:11:28 pm »
Thanks for explanation.

I am very happy with LAzarus 1.2RC1.
Very stable.

hovadur

  • Newbie
  • Posts: 5
Re: Lazarus Release Candidate 1 of 1.2
« Reply #63 on: December 15, 2013, 10:02:11 pm »
Hi, in lazarus 1.2RC1, has the same bug: http://forum.lazarus.freepascal.org/index.php?topic=22530.0 

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 9792
  • Debugger - SynEdit - and more
    • wiki
Re: Lazarus Release Candidate 1 of 1.2
« Reply #64 on: December 15, 2013, 10:11:46 pm »
Hi, in lazarus 1.2RC1, has the same bug: http://forum.lazarus.freepascal.org/index.php?topic=22530.0

The fix has already been merged to RC2
Quote
r43364 Debugger: prevent messing up the environment on windows, due to gdb bug (gdb not setting debuggee environment) / introduced in rev 42419

This is windows only, and the problem is that gdb (7.2) on win, does not handle custom env for the app (the app and gdb and the IDE, all have the same env).

hovadur

  • Newbie
  • Posts: 5
Re: Lazarus Release Candidate 1 of 1.2
« Reply #65 on: December 15, 2013, 10:38:08 pm »
The fix has already been merged to RC2
Thanks

JD

  • Hero Member
  • *****
  • Posts: 1848
Re: Lazarus Release Candidate 1 of 1.2
« Reply #66 on: December 19, 2013, 04:38:29 pm »
Form resizing issues on Linux
Resizing forms in Linux Lazarus 1.2RC1 on Linux (Linux Mint 16) is very frustrating. The form always goes back to the default size. It usually takes up to 7 or 8 tries for the form to keep its new size.

I must say that I'm also using AnchorDocking and bring the form to the front mean hitting the F12 key twice or clicking on the bring to front icon twice. The form also returns to the default position whenever it is brought to front even if I had moved it elsewhere previously.

JD
« Last Edit: December 19, 2013, 04:40:41 pm by JD »
Windows - Lazarus 2.1/FPC 3.2 (built using fpcupdeluxe),
Linux Mint - Lazarus 2.1/FPC 3.2 (built using fpcupdeluxe)

mORMot; Zeos 8; SQLite, PostgreSQL & MariaDB; VirtualTreeView

snorkel

  • Hero Member
  • *****
  • Posts: 817
Re: Lazarus Release Candidate 1 of 1.2
« Reply #67 on: December 19, 2013, 06:50:37 pm »
The docking package causes a lot of issues.  I was using it but went back to the floating set up instead as it was just less hassle.
I do prefer a fully docked IDE, but f12 simply does not work correctly with docking enabled.
***Snorkel***
If I forget, I always use the latest stable 32bit version of Lazarus and FPC. At the time of this signature that is Laz 3.0RC2 and FPC 3.2.2
OS: Windows 10 64 bit

JD

  • Hero Member
  • *****
  • Posts: 1848
Re: Lazarus Release Candidate 1 of 1.2
« Reply #68 on: December 20, 2013, 08:48:37 am »
The docking package causes a lot of issues.  I was using it but went back to the floating set up instead as it was just less hassle.
I do prefer a fully docked IDE, but f12 simply does not work correctly with docking enabled.

AnchorDocking is less problematic on Windows. I also use Lazarus 1.2RC1 on Windows Vista & it is much better there.
Windows - Lazarus 2.1/FPC 3.2 (built using fpcupdeluxe),
Linux Mint - Lazarus 2.1/FPC 3.2 (built using fpcupdeluxe)

mORMot; Zeos 8; SQLite, PostgreSQL & MariaDB; VirtualTreeView

lhxzui

  • New Member
  • *
  • Posts: 14
Re: Lazarus Release Candidate 1 of 1.2
« Reply #69 on: December 22, 2013, 08:40:57 am »
Hi,
I encounter a problem.
Platform: Windows XP SP3, IDE version: Lazarus IDE v1.12RC1
In unit file, The single quote mark by the right side is not displayed when using plus sign to connect strings, which contains only one Chinese punctuation ‘、’, when keeping cursor away from the string. It will be display correctly When putting cursor inside, or against the left side of, or against the right side of the string.
So, I change the environment as below.
Platform: Windows 7 SP1, IDE version: Lazarus IDE v1.0.14
The situation is difference.In unit file, The single quote mark by the right side is displayed on the wrong place where there should be one blank by the right side of the single quote mark, when using plus sign to connect strings, which contains only one Chinese punctuation ‘、’, when keeping cursor away from the string. It will be display correctly When putting cursor inside, or against the left side of, or against the right side of the string.
Bad English. Did I describe clearly?
« Last Edit: December 22, 2013, 08:46:03 am by lhxzui »

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 9792
  • Debugger - SynEdit - and more
    • wiki
Re: Lazarus Release Candidate 1 of 1.2
« Reply #70 on: December 22, 2013, 10:50:21 am »
Hi,
I encounter a problem.
Platform: Windows XP SP3, IDE version: Lazarus IDE v1.12RC1
In unit file, The single quote mark by the right side is not displayed when using plus sign to connect strings, which contains only one Chinese punctuation ‘、’, when keeping cursor away from the string. It will be display correctly When putting cursor inside, or against the left side of, or against the right side of the string.
So, I change the environment as below.

Explanation is ok. I can only test in a week.

Chinese dot may be a " full width" char. Please check which font you use (tools > options)
Maybe try other fonts. MUST be monospaced. (courier / deja vu mono)

Please also attach a demo unit with the text. zip it, and attach it here. thank you.


lhxzui

  • New Member
  • *
  • Posts: 14
Re: Lazarus Release Candidate 1 of 1.2
« Reply #71 on: December 22, 2013, 02:12:56 pm »
Hi,
Thanks for your answer.
The font I use is the default editor font, Courier New. I didn’t change.
And, I share my code here, in the appendix, named unit1.zip. It is one part of a small test program I use to learn GroupBox and RadioGroup, according to a video of teaching Delphi7 made by some teacher. The position of the problem I depicted is in the line 60 of the file unit1.pas. Please check it.
By the way, I am a new on lazarus. The RAD, easy using, small and exquisite, highly active of lazarus fascinate me.
Thank you again.

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 9792
  • Debugger - SynEdit - and more
    • wiki
Re: Lazarus Release Candidate 1 of 1.2
« Reply #72 on: December 22, 2013, 02:45:35 pm »
Will test next week. Currently not on windows

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 9792
  • Debugger - SynEdit - and more
    • wiki
Re: Lazarus Release Candidate 1 of 1.2
« Reply #73 on: December 28, 2013, 02:21:30 pm »
@lhxzui

There is indeed an issue with this (and a few other) char(s).

Background: The editor does only deal with monospaced fonts. In a monospaced font there are chars of only 2 widths (full (some east Asian and others) and half (Latin)).
http://en.wikipedia.org/wiki/Halfwidth_and_fullwidth_forms
http://www.unicode.org/reports/tr11/

The width of each char can (or should) be predicted from a table http://www.unicode.org/Public/UCD/latest/ucd/EastAsianWidth.txt
(actually a few a ambiguous)
Your comma is utf8 e3 80 81 or in the table 3001 (marked "W")

It appears that this table is currently not fully implemented.

If the char width that the editor believes, differs from he actual font, then you get missing chars, and chars that jump, when the caret moves.

But it is not that simple to fix. The error does not happen on my PC. It appears that European versions of windows treat those chars as half width.

This means adding the missing entries will only shift the problem: It will (probably) work for you, but then fail for others, that get correct results now.

------------------------------
This will not be possible to fix for 1.2
And due to the above problem with different window versions, it is unclear how and when it will be fixed.

There are various ways you can try to workaround the problem.
You need only 1 of them. I expect 2 should be best.

1) In the options / Editor / Display: Change the "Extra char spacing" to 1 or -1
This does however look ugly

2) Compile (on windows only) your IDE with  WithSynExperimentalCharWidth defined.
Add to defines in "Configure build lazarus" or add command line option -pWithSynExperimentalCharWidth

3) add e3 80 81  to the list in SynEditTextDoubleWidthChars
But there are more chars....

4) unit SynTextDrawer
line 673 in  procedure CalcFontAdvance
Code: [Select]
  // take several samples
  ETO := False;
change the value to "True"
again this may not always look nice. (but better than (1))

-----------------------------
This should be reported on mantis

lhxzui

  • New Member
  • *
  • Posts: 14
Re: Lazarus Release Candidate 1 of 1.2
« Reply #74 on: December 28, 2013, 04:33:13 pm »
@Martin_fr
Thank you very much.
I found the font Deja Vu Sans Mono. It’s A-OK.  ;)
Good luck. :)


 

TinyPortal © 2005-2018