* * *

Author Topic: Lazarus Release 1.8 (with FPC 3.0.4)  (Read 32016 times)

JuhaManninen

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3302
  • I like bugs.
Re: Lazarus Release 1.8 (with FPC 3.0.4)
« Reply #75 on: January 03, 2018, 03:42:28 pm »
TMemo.SelText problem persists, two latest patches were no applied.
https://bugs.freepascal.org/view.php?id=32583
A bug report should be reopened if the bug still persists. Comments in a resolved issue are typically not followed.

del

  • Newbie
  • Posts: 4
Re: Lazarus Release 1.8 (with FPC 3.0.4)
« Reply #76 on: January 05, 2018, 09:58:12 am »
Me like.   :D


antekgla

  • New member
  • *
  • Posts: 22
Re: Lazarus Release 1.8 (with FPC 3.0.4)
« Reply #77 on: January 08, 2018, 05:37:27 am »
Hi!
I have a problem related to Lazarus 1.8 0 fpc 3.0.4 I dont know if this thread is the suitable for this or I have to open a new thread...
 
I am a collaborator in TransGUI

The code compile just fine in 1.6 and 1.8 but at runtime ( only in 1.8 ) there is a problem with a TPageControl component...

Each tab has assigned a shortcut, when you press the shortcut the tab is changed but the content is not showed. When you change tabs with the mouse the behavior is normal. (the content of the tab is showed)

This problem dont occur in Lazarus 1.6 the shortcuts change the tabs and the content is showed.

The shortcut change tabs like this:
Code: Pascal  [Select]
  1.         case Keypressed of
  2.            VK_G: PageInfo.PageIndex:=0;
  3.            VK_K: PageInfo.PageIndex:=1;
  4.            VK_P: PageInfo.PageIndex:=2;
  5.            VK_F: PageInfo.PageIndex:=3;  
  6.  

This behavior is described in this post in Github (with Screenshots)

Edit: change thru PageInfo.ActivePage := don't solve the issue.
« Last Edit: January 08, 2018, 05:47:39 am by antekgla »

GetMem

  • Hero Member
  • *****
  • Posts: 2618
Re: Lazarus Release 1.8 (with FPC 3.0.4)
« Reply #78 on: January 08, 2018, 07:49:06 am »
@antekgla
Can you supply a small example that demonstrates the issue? I cannot reproduce the bug,  TPageControl works fine both on Lazarus_1.8 and Lazarus_trunk. Download the attached project then press: Alt + P,  Alt + F, etc...

antekgla

  • New member
  • *
  • Posts: 22
Re: Lazarus Release 1.8 (with FPC 3.0.4)
« Reply #79 on: January 09, 2018, 04:37:02 am »
@antekgla
Can you supply a small example that demonstrates the issue? I cannot reproduce the bug,  TPageControl works fine both on Lazarus_1.8 and Lazarus_trunk. Download the attached project then press: Alt + P,  Alt + F, etc...

I compile your example and Yes works OK.

I dont know how reproduce this issue in a new project.
You can compile TransGUI is not a complicated program. I am a newbie in Lazarus and I can compile without problem.
Only need install a component (included) in the sources (TVarGRid).

GetMem

  • Hero Member
  • *****
  • Posts: 2618
Re: Lazarus Release 1.8 (with FPC 3.0.4)
« Reply #80 on: January 09, 2018, 11:05:25 am »
Quote
@antekgla
I dont know how reproduce this issue in a new project.
You can compile TransGUI is not a complicated program. I am a newbie in Lazarus and I can compile without problem.
Only need install a component (included) in the sources (TVarGRid).
I really don't like debug third party applications/components. However, it looks like you have some relevant code in PageInfo(TPageControl) OnChange event. The big difference between 1.6 and 1.8, is that in case of 1.6 the OnChange event is automatically called when you programmatically change ActivePageIndex. To do the same in 1.8 just set nboDoChangeOnSetIndex to true in the form OnCreate event, with ifdef to avoid code break.
Code: Pascal  [Select]
  1. uses ...LCLVersion;
  2.  
  3. procedure TMainForm.FormCreate(Sender: TObject);
  4. begin
  5.   //...
  6.  {$IF LCL_FULLVERSION >= 1080000}
  7.    PageInfo.Options := PageInfo.Options + [nboDoChangeOnSetIndex]
  8.  {$ENDIF}
  9. end;

This will most likely fix the issue.
« Last Edit: January 09, 2018, 11:23:26 am by GetMem »

antekgla

  • New member
  • *
  • Posts: 22
Re: Lazarus Release 1.8 (with FPC 3.0.4)
« Reply #81 on: January 09, 2018, 03:48:28 pm »
I really don't like debug third party applications/components. However, it looks like you have some relevant code in PageInfo(TPageControl) OnChange event. The big difference between 1.6 and 1.8, is that in case of 1.6 the OnChange event is automatically called when you programmatically change ActivePageIndex. To do the same in 1.8 just set nboDoChangeOnSetIndex to true in the form OnCreate event, with ifdef to avoid code break.
Code: Pascal  [Select]
  1. uses ...LCLVersion;
  2.  
  3. procedure TMainForm.FormCreate(Sender: TObject);
  4. begin
  5.   //...
  6.  {$IF LCL_FULLVERSION >= 1080000}
  7.    PageInfo.Options := PageInfo.Options + [nboDoChangeOnSetIndex]
  8.  {$ENDIF}
  9. end;

This will most likely fix the issue.

Wow, that really solve the issue.
I am amazed of your wisdom!

Thank you very much for taking the time to look at this!!!

PD: Last question... this 1.8 behaviour of not calling the OnChange method when is done programatically applies only to TPageControl or to all components?
« Last Edit: January 09, 2018, 03:55:50 pm by antekgla »

wp

  • Hero Member
  • *****
  • Posts: 4074
Re: Lazarus Release 1.8 (with FPC 3.0.4)
« Reply #82 on: January 09, 2018, 04:10:30 pm »
I don't think so. But find out yourself by reading the code-breaking changes in 1.8: http://wiki.freepascal.org/Lazarus_1.8.0_release_notes#Changes_affecting_compatibility
Lazarus trunk / fpc 3.0.4 / all 32-bit on Win-10

reinhardt1053

  • New member
  • *
  • Posts: 7
    • encompass
Re: Lazarus Release 1.8 (with FPC 3.0.4)
« Reply #83 on: January 10, 2018, 11:27:36 am »
Thank you!

bastynator

  • New member
  • *
  • Posts: 5
Re: Lazarus Release 1.8 (with FPC 3.0.4)
« Reply #84 on: January 12, 2018, 11:20:45 am »
Works great  8) Thanks for work

 

Recent

Get Lazarus at SourceForge.net. Fast, secure and Free Open Source software downloads Open Hub project report for Lazarus