Re: [Lazarus] Code comment conflicts with code in LCL
On Sun, Feb 4, 2018 at 12:17 AM, Graeme Geldenhuys via Lazaruswrote: > // no Graphics or Controls can be used here to prevent circular references I fixed the comment in r57276. Controls indeed cannot be used there. It creates a circular reference. Juha -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Lazarus trunk: AV on rightClick on Component-pallette: ShowAll
On Thu, Feb 8, 2018 at 11:16 PM, john Landmesser via Lazaruswrote: > Without own components it is ok but this AV appears again after compiling > with my extra components?!! Ok, there you go... Do the components work when added from the palette? Your stack trace is usable but better still would be a proper GDB backtrace. Run Lazarus under GDB and then type "bt" after the AV. > Ctrl-Alt-P is already defined on my Linux XFCE The same window can be opened also from menu View -> Components. Juha -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Lazarus trunk: AV on rightClick on Component-pallette: ShowAll
same experience for Linux XFCE and own components installed -> AV with these messages: TLazarusManager.Run starting /home/john1/lazarus/lazarus ... Hint: (lazarus) [TMainIDE.ParseCmdLineOptions] PrimaryConfigPath="/home/john1/.lazarus" Hint: (lazarus) [TMainIDE.ParseCmdLineOptions] SecondaryConfigPath="/etc/lazarus" Hint: (lazarus) [TBuildManager.SetBuildTarget] Old=x86_64-linux-gtk2 New=x86_64-linux-gtk2 FPC=True LCL=False TObjectInspectorDlg.FillPersistentComboBox: Updating ComboBox with components TObjectInspectorDlg.FillPersistentComboBox: Updating ComboBox with components TComponentTreeView.SetSelection: Updating component node values. TLazSourceFileManager.LoadLFM Creating designer for hidden component of /run/media/john1/ntfs1/PROJEKTE/Lazarus/Anleitung/unit1.pas TLazSourceFileManager.InitOpenedProjectFile select form in designer: Form1:TForm1 TDesigner TObjectInspectorDlg.FillPersistentComboBox: Updating ComboBox with components (lazarus:3564): GLib-GObject-WARNING **: gsignal.c:1207: no emission of signal "button-release-event" to stop for instance '0x3b8fa90' (lazarus:3564): GLib-GObject-WARNING **: gsignal.c:1207: no emission of signal "button-release-event" to stop for instance '0x3b8fa90' (lazarus:3564): GLib-GObject-WARNING **: gsignal.c:1207: no emission of signal "button-release-event" to stop for instance '0x3b8fa90' TApplication.HandleException Access violation Stack trace: $005A150D line 5745 of include/control.inc $009105AC line 2254 of idewindowintf.pas $004B5A51 line 5916 of main.pp $009B9C91 line 565 of componentpalette.pas $005D9C4C line 83 of include/menuitem.inc $005DA528 line 293 of include/menuitem.inc $00432E0F $00655421 line 3705 of gtk2/gtk2proc.inc $007D09F6 line 139 of gtk2/gtk2wsmenus.pp $7F5F99D5EC5D TObjectInspectorDlg.FillPersistentComboBox: Updating ComboBox with components LAZARUS END - cleaning up ... Hint: (lazarus) [TMainIDE.Destroy] B -> inherited Destroy... TMainIDE Hint: (lazarus) [TMainIDE.Destroy] END -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Lazarus trunk: AV on rightClick on Component-pallette: ShowAll
did a fresh svn download of lazarus Without own components it is ok but this AV appears again after compiling with my extra components?!! -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Lazarus trunk: AV on rightClick on Component-pallette: ShowAll
Am 08.02.2018 um 21:45 schrieb John Landmesser via Lazarus: On 08.02.2018 20:58, Juha Manninen via Lazarus wrote: On Thu, Feb 8, 2018 at 8:51 PM, Juha Manninenwrote: Can you open the components list with Ctrl-Shift-P ? I meant Ctrl-Alt-P. Juha sam AV if i use the keyboard shortcut strange: same AV on Win 10 In Office i tested with Windows XP Now at home i tested Linux XFCE and Windows 10 So there are two different hardware configuration with same AV error. I have fpc 3.02 and 3.0.4 !? -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Lazarus trunk: AV on rightClick on Component-pallette: ShowAll
On 08.02.2018 20:58, Juha Manninen via Lazarus wrote: On Thu, Feb 8, 2018 at 8:51 PM, Juha Manninenwrote: Can you open the components list with Ctrl-Shift-P ? I meant Ctrl-Alt-P. Juha sam AV if i use the keyboard shortcut -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Lazarus trunk: AV on rightClick on Component-pallette: ShowAll
On 08.02.2018 20:58, Juha Manninen via Lazarus wrote: On Thu, Feb 8, 2018 at 8:51 PM, Juha Manninenwrote: Can you open the components list with Ctrl-Shift-P ? I meant Ctrl-Alt-P. Juha Ctrl-Alt-P is already defined on my Linux XFCE Have to learn how to redefine it in Lazarus Same issue for Windows XP Lazarus trunk! -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] High-DPI TImageList
First of all, the image list became multi-resolution. You have the new class TCustomImageListResolution that is the new "TCustomImageList". You have to move your custom code there. On 08.02.2018 16:02, lainz via Lazarus wrote: Hi, I have a component BGRAImageList that fixes basically the alpha channels of the regular ImageList on Linux using BGRABitmap. I did not code that component, but I'm the one that updates the package. Sources: https://github.com/bgrabitmap/bgracontrols/blob/master/bgraimagelist.pas It works fine in 1.8, but in trunk there are changes like: 1.8 TCustomImageList = class(TLCLReferenceComponent) 1.9 is TCustomImageList = class(TLCLComponent), so the method ReferenceNeeded is not available. Questions: - *What does ReferenceNeeded, and if it is necessary on 1.9*. On win32 you need a handle for WinAPI native controls. The real imagelist code (along with ReferenceNeeded method) was moved into TCustomImageListResolution. You have to move all your code into a TCustomImageListResolution descendant and register it in TCustomImageList.GetResolutionClass. Another is this: 1.8 procedure Draw(ACanvas: TCanvas; AX, AY, AIndex: Integer; ADrawingStyle: TDrawingStyle; AImageType: TImageType; ADrawEffect: TGraphicsDrawEffect); overload; virtual; 1.9 procedure Draw(ACanvas: TCanvas; AX, AY, AIndex: Integer; ADrawingStyle: TDrawingStyle; AImageType: TImageType; ADrawEffect: TGraphicsDrawEffect); overload; In 1.9 the virtual was removed and I can't use override anymore. Again, override TCustomImageListResolution.Draw My question is *if the method still will be called instead of the LCL one in 1.9 without using override*. I know this is a basic of OOP but I need a bit of help because I never use virtual and overload. Override TCustomImageListResolution.Draw Another question: If I remove override to compile in 1.9, what happens in 1.8? The new image list from 1.9 is not compatible with 1.8. You have to release a new version for 1.9+ only. I never use IFDEF LCL_FULLVERSION and don't know how to use it, any chances to have 2 different methods, one with override and other without, one for 1.8 and one for 1.9 or newer? And the big question: *Transparency is now or will be fixed on linux, so I don't need this component anymore and I can archive it?* I didn't change anything about transparency but for me transparency works fine on both Gtk2 and Qt Linux. (I don't know any other details.) Ondrej -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Lazarus trunk: AV on rightClick on Component-pallette: ShowAll
On Thu, Feb 8, 2018 at 8:51 PM, Juha Manninenwrote: > Can you open the components list with Ctrl-Shift-P ? I meant Ctrl-Alt-P. Juha -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] High-DPI TImageList
On Thu, Feb 8, 2018 at 5:02 PM, lainz via Lazaruswrote: > 1.8 > TCustomImageList = class(TLCLReferenceComponent) > > 1.9 is TCustomImageList = class(TLCLComponent), so the method > ReferenceNeeded is not available. > > Questions: > - *What does ReferenceNeeded, and if it is necessary on 1.9*. TLCLReferenceComponent has a handle. I have no idea why an ImageList would need a handle. I noticed there is now: TCustomImageListResolution = class(TLCLReferenceComponent) Maybe Ondrej can explain why it is there. Juha -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] High-DPI TImageList
Ok Juha thanks. And what about the ifdef for that missing method? ReferenceNeeded Sent from Mailspring (https://link.getmailspring.com/link/local-0739f840-40a8-v1.1.3-27dcee2f@PC-i7/0?redirect=https%3A%2F%2Fgetmailspring.com%2F=lazarus%40lists.lazarus-ide.org), the best free email app for work On feb. 8 2018, at 3:59 pm, Juha Manninen via Lazaruswrote: > > On Thu, Feb 8, 2018 at 5:02 PM, lainz via Lazarus > wrote: > > My question is *if the method still will be called instead of the LCL one in > > 1.9 without using override*. I know this is a basic of OOP but I need a bit > > of help because I never use virtual and overload. > > > Virtual methods are polymorphic so a caller does not need to know the > actual type of an object. The correct virtual / overridden method is > always called. > I guess your code knows the exact type (BGRAImageList) and can use it. > Thus the correct method is called even if it is not virtual. > > Juha > -- > ___ > Lazarus mailing list > Lazarus@lists.lazarus-ide.org > https://lists.lazarus-ide.org/listinfo/lazarus > -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] High-DPI TImageList
On Thu, Feb 8, 2018 at 5:02 PM, lainz via Lazaruswrote: > My question is *if the method still will be called instead of the LCL one in > 1.9 without using override*. I know this is a basic of OOP but I need a bit > of help because I never use virtual and overload. Virtual methods are polymorphic so a caller does not need to know the actual type of an object. The correct virtual / overridden method is always called. I guess your code knows the exact type (BGRAImageList) and can use it. Thus the correct method is called even if it is not virtual. Juha -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Lazarus trunk: AV on rightClick on Component-pallette: ShowAll
On Thu, Feb 8, 2018 at 6:48 PM, John Landmesser via Lazaruswrote: > bug report done > https://bugs.freepascal.org/view.php?id=33139 Ah, I was just planning to write that I cannot reproduce. Works well here. Can you open the components list with Ctrl-Shift-P ? Can anybody else reproduce? > Lazarus 1.9.0 "today" FPC 3.0.4 i386-win32-win32/win64 Your report says GTK2 / Linux. I also tested on both Linux and Windows. Juha -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Lazarus trunk: AV on rightClick on Component-pallette: ShowAll
On 08.02.2018 12:57, Landmesser John via Lazarus wrote: do i have to write a bug report? Lazarus 1.9.0 "today" FPC 3.0.4 i386-win32-win32/win64 bug report done https://bugs.freepascal.org/view.php?id=33139 -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Show crash info to user (MadExcept)
On Thu, 8 Feb 2018, AlexeyT via Lazarus wrote: Hi In Delphi i used lib MadExcept. I need similar lib in Laz too. To show to user reason of crash- src filename, line number, stack How to do it? Hook into the various exception handling routines, and use routines similar to the ones found in heaptrc. The lazarus IDE also contains some nice examples of logging when an exception occurs. Michael. -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] High-DPI TImageList
Hi, I have a component BGRAImageList that fixes basically the alpha channels of the regular ImageList on Linux using BGRABitmap. I did not code that component, but I'm the one that updates the package. Sources: https://github.com/bgrabitmap/bgracontrols/blob/master/bgraimagelist.pas It works fine in 1.8, but in trunk there are changes like: 1.8 TCustomImageList = class(TLCLReferenceComponent) 1.9 is TCustomImageList = class(TLCLComponent), so the method ReferenceNeeded is not available. Questions: - *What does ReferenceNeeded, and if it is necessary on 1.9*. Another is this: 1.8 procedure Draw(ACanvas: TCanvas; AX, AY, AIndex: Integer; ADrawingStyle: TDrawingStyle; AImageType: TImageType; ADrawEffect: TGraphicsDrawEffect); overload; virtual; 1.9 procedure Draw(ACanvas: TCanvas; AX, AY, AIndex: Integer; ADrawingStyle: TDrawingStyle; AImageType: TImageType; ADrawEffect: TGraphicsDrawEffect); overload; In 1.9 the virtual was removed and I can't use override anymore. My question is *if the method still will be called instead of the LCL one in 1.9 without using override*. I know this is a basic of OOP but I need a bit of help because I never use virtual and overload. Another question: If I remove override to compile in 1.9, what happens in 1.8? I never use IFDEF LCL_FULLVERSION and don't know how to use it, any chances to have 2 different methods, one with override and other without, one for 1.8 and one for 1.9 or newer? And the big question: *Transparency is now or will be fixed on linux, so I don't need this component anymore and I can archive it?* -- Sent from: http://free-pascal-lazarus.989080.n3.nabble.com/ -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
[Lazarus] Show crash info to user (MadExcept)
Hi In Delphi i used lib MadExcept. I need similar lib in Laz too. To show to user reason of crash- src filename, line number, stack How to do it? -- Regards, Alexey -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
[Lazarus] Lazarus trunk: AV on rightClick on Component-pallette: ShowAll
do i have to write a bug report? Lazarus 1.9.0 "today" FPC 3.0.4 i386-win32-win32/win64 -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus