Recent

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

hinst

  • Sr. Member
  • ****
  • Posts: 303
Re: Lazarus Release Candidate 1 of 1.2
« Reply #75 on: December 30, 2013, 05:06:41 pm »
I found a bug. Easily reproducible one this time. Related to code completion.
Observe the following source code:
Code: [Select]
program project1;

type

  { TSearcher }

  TSearcher = class
    public type TResult = record
      Name: string;
    end;
    public class function Search: TResult;
  end;

{ TSearcher }

class function TSearcher.Search: TResult;
begin
  result.{press Ctrl+Space here: won't work}
end;

begin
end.

It says "Error: identifier not found: TResult".
Should be easy enough to fix I think. Code completion is one of the most important features for Lazarus IMHO; would be nice if it supported latest language features like nested types in this case
Too late to escape fate

BlueIcaro

  • Hero Member
  • *****
  • Posts: 834
    • Blog personal
Re: Lazarus Release Candidate 1 of 1.2
« Reply #76 on: December 30, 2013, 05:21:20 pm »
Try this
Code: Pascal  [Select][+][-]
  1.  
  2. type
  3.   TResult = record
  4.     Name: string;
  5.   end;
  6.  
  7. type
  8.  
  9.   { TSearcher }
  10.  
  11.   TSearcher = class
  12.   public
  13.     Result: Result;
  14.   public
  15.     class function Search: TResult;
  16.   end;
  17.                

/blueIcaro

kc87654321

  • New Member
  • *
  • Posts: 17
1.2 Compile for arm-linux no work! it is BUG
« Reply #77 on: December 31, 2013, 12:03:46 am »
Compile for arm-linux no work!
it is BUG.

 Cross compile the LCL:
    * Open Tools / Configure Build Lazarus /
Option: enter -Xparm-linux-
I GET Assembler /home/user/lazarus/fpc/binutils/as not found,
 :P
Lazarus Release  1.2
UBUNTU11.04

Henppy

  • Jr. Member
  • **
  • Posts: 60
Re: Lazarus Release Candidate 1 of 1.2
« Reply #78 on: January 19, 2014, 04:11:16 am »
Gentlemen, I'm a newbie to Lazarus so first time I "live" through an RC version. So I have a question: how thrust-worthy is a Lazarus RC?

I'm currently working on a project and unfortunately I had to switch to 1.2RC2 for this as I needed some code in SynEdit that was introduced there. Now, I'm not sure how complete the code is, or what type of issues I could find.  Obviously I would expect some issue with SynEdit, but then again it seems to be working fine, so...

The release page for 1.2.0 doesn't list any change that could affect what I'm doing, but you know, maybe the page got outdated (after all, it says nothing about SynEdit). As I said, my first time through an RC.

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 12345
  • Debugger - SynEdit - and more
    • wiki
Re: Lazarus Release Candidate 1 of 1.2
« Reply #79 on: January 19, 2014, 04:51:46 am »
IMHO RC2 is already high quality.

Many people (including the developers, and I) use SVN trunk. In terms of quality trunk usually is the least stable (has the highest likelihood of bugs). Yet it works amazingly well.

The Release candidates are from what is called a "fixes branch".

The fixes branch for all 1.2 RC and releases was created on 15 Sept 2013. So about 4 month back.

Since then this branch was used to improve stability. That is 4 month of fixes.

There are currently very few known regressions (thinks that used to work in previous versions, but no longer work) left. (One was regarding visual form inheritance).

As for SynEdit:
It is used in the IDE, if it had a regression, it would most likely have been reported by now. It also passes its testsuite.

----------
Otherwise it is impossible to say, what to expect. New bugs can happen everywhere (in the IDE, the LCL, any component, anything...) But overall, there where many 100 bugs fixed, since 1.0.x. So it is likely to either level out or be better.

Examples for issues can be found on mantis(bug tracker), or check what we already have fixed:
For 1.2 RC: http://wiki.lazarus.freepascal.org/Lazarus_1.2_fixes_branch
For 1.0.x http://wiki.lazarus.freepascal.org/Lazarus_1.0_fixes_branch

Quote
The release page for 1.2.0 doesn't list any change that could affect what I'm doing, but you know, maybe the page got outdated (after all, it says nothing about SynEdit).
It is usually well maintained, but that said we are all human, and oversight is possible.
As for SynEdit, I do not recall anything which I believe to break compatibility.

taazz

  • Hero Member
  • *****
  • Posts: 5368
Re: Lazarus Release Candidate 1 of 1.2
« Reply #80 on: February 07, 2014, 09:54:29 am »
today was a glorious day I enabled the win7 themes after working almost 2 years with out them in any case here is a screenshot of the component bar take a look on the menus. Is it only me that sees that or you guys have the themes disabled too?
Good judgement is the result of experience … Experience is the result of bad judgement.

OS : Windows 7 64 bit
Laz: Lazarus 1.4.4 FPC 2.6.4 i386-win32-win32/win64

hinst

  • Sr. Member
  • ****
  • Posts: 303
Re: Lazarus Release Candidate 1 of 1.2
« Reply #81 on: February 07, 2014, 03:32:39 pm »
@taazz
I don't see how are they disabled. What makes you think that Windows 7 default theme is disabled? I notice that menu item titles are somehow cut; only half of last letter is visible... but Windows 7 theme appears enabled. I use Windows 8, for me both Lazarus 1.2 RC and Lazarus 1.0.14 appear fully themed, menus at top appear properly themed too; system theme is applied. I don't have issue with last letter in menu item title only partially visible
Too late to escape fate

taazz

  • Hero Member
  • *****
  • Posts: 5368
Re: Lazarus Release Candidate 1 of 1.2
« Reply #82 on: February 07, 2014, 03:42:15 pm »
I said that I keep my themes disabled, when I enabled them I got the half last letter on the menus. Now my themes are disabled again and everything looks good to me again,  do you have win 7 themes enabled and if yes do you see the half letter in the menus too? Should I enable them again and do some tests for you? 
Good judgement is the result of experience … Experience is the result of bad judgement.

OS : Windows 7 64 bit
Laz: Lazarus 1.4.4 FPC 2.6.4 i386-win32-win32/win64

Henppy

  • Jr. Member
  • **
  • Posts: 60
Re: Lazarus Release Candidate 1 of 1.2
« Reply #83 on: February 07, 2014, 11:00:25 pm »
Win7 64 bits here, themes enabled (1920x1080 res) and I see everything normal.

Could it be something specific to that theme? The colors don't look like the standard so maybe some setting you changed?

Lazarus 1.2RC2 r43696
« Last Edit: February 07, 2014, 11:03:02 pm by Henppy »

engkin

  • Hero Member
  • *****
  • Posts: 3112
Re: Lazarus Release Candidate 1 of 1.2
« Reply #84 on: February 08, 2014, 01:49:58 am »
today was a glorious day I enabled the win7 themes after working almost 2 years with out them in any case here is a screenshot of the component bar take a look on the menus. Is it only me that sees that or you guys have the themes disabled too?
It seems to me there is one pixel missing.

lcl\interfaces\win32\win32wsmenus.pp
Quote
function MenuItemSize(AMenuItem: TMenuItem; AHDC: HDC): TSize;
..
    if AMenuItem.IsInMenuBar then
      Result := VistaBarMenuItemSize(AMenuItem, AHDC)

........

function VistaBarMenuItemSize(AMenuItem: TMenuItem; ADC: HDC): TSize;
..
  Metrics := GetVistaBarMenuMetrics(AMenuItem, ADC);
..
  Result.cx := Result.cx + Metrics.TextSize.cx + IconSize.x;

........

function GetVistaBarMenuMetrics(const AMenuItem: TMenuItem; DC: HDC): TVistaBarMenuMetrics;
..
  Result.TextSize.cx := TextRect.Right - TextRect.Left;//<--- missing one pixel?
  Result.TextSize.cx := TextRect.Right - TextRect.Left + 1;//<--- correction

When I have 20 pixels text its width is calculated
Code: [Select]
TextWidth := TextRect.Right - TextRect.Left + 1;
//20      := 19             - 0             + 1;

That's my guess. You should have that same problem with your applications that use TMainMenu as well. If it's true, the height needs a similar correction.

taazz

  • Hero Member
  • *****
  • Posts: 5368
Re: Lazarus Release Candidate 1 of 1.2
« Reply #85 on: February 08, 2014, 03:53:30 am »
[snip...]
You should have that same problem with your applications that use TMainMenu as well. If it's true, the height needs a similar correction.

I just seen this, so I can't comment the code portion yet, but yes my application have the same problem as well. I don't know if it is proper to add a margin of 1 pixel though.
Good judgement is the result of experience … Experience is the result of bad judgement.

OS : Windows 7 64 bit
Laz: Lazarus 1.4.4 FPC 2.6.4 i386-win32-win32/win64

engkin

  • Hero Member
  • *****
  • Posts: 3112
Re: Lazarus Release Candidate 1 of 1.2
« Reply #86 on: February 08, 2014, 04:07:17 am »
I just seen this, so I can't comment the code portion yet, but yes my application have the same problem as well. I don't know if it is proper to add a margin of 1 pixel though.
I'm not sure either. Every code I saw does not add it, so I assume I'm wrong.

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 12345
  • Debugger - SynEdit - and more
    • wiki
Re: Lazarus Release Candidate 1 of 1.2
« Reply #87 on: February 08, 2014, 04:13:24 pm »
It seems to me there is one pixel missing.

lcl\interfaces\win32\win32wsmenus.pp
Quote
  Result.cx := Result.cx + Metrics.TextSize.cx + IconSize.x;
........
Code: [Select]
TextWidth := TextRect.Right - TextRect.Left + 1;
//20      := 19             - 0             + 1;

That's my guess. You should have that same problem with your applications that use TMainMenu as well. If it's true, the height needs a similar correction.

I checked the Doc on msdn, and It appears indeed the pixel is missing.

And yes that means Y too.

Can you test, if it works well for you, if you add 1 to each x and y ?

taazz

  • Hero Member
  • *****
  • Posts: 5368
Re: Lazarus Release Candidate 1 of 1.2
« Reply #88 on: February 08, 2014, 04:40:02 pm »
I'm going to apply engkin's solution and test it with themes again tonight. It will take a while at 1GB ram and intel embedded graphics win7 with themes is a pain to watch refreshing.

@Henppy I don't think there is anything non standard on my theme I just changed a couple of colors to get a more dark look and the background images to a more appropriate darker theme. just in case I'll do a reset and test it with the default colors as well.

Thank you every one for your time.
Good judgement is the result of experience … Experience is the result of bad judgement.

OS : Windows 7 64 bit
Laz: Lazarus 1.4.4 FPC 2.6.4 i386-win32-win32/win64

engkin

  • Hero Member
  • *****
  • Posts: 3112
Re: Lazarus Release Candidate 1 of 1.2
« Reply #89 on: February 08, 2014, 08:01:25 pm »
Can you test, if it works well for you, if you add 1 to each x and y ?
Thanks for checking. Unfortunately I don't have Win 7, so I can not reproduce.

 

TinyPortal © 2005-2018