Re: [Lazarus] vertically space controls
Am 28.04.2024 um 18:56 schrieb duilio foschi via lazarus: I select N controls in a form. C1 is the top control. C6 is the lowest control. I want controls C1..C6 be equally spaced in the vertical space given by C1.Top and C6.Top. In Delphi 5 IDE I had the Alignment Palette by which I could do that (and other useful operations). I cannot find the same tool in Lazarus v. 2.2.4. Is there such a tool? Select the controls. Right-click one of them. --> "Align" --> In the "vertical" box select "Space equally". -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] I can't exit this component
Am 29.03.2024 um 12:09 schrieb Arí Ricardo Ody via lazarus: procedure TfrmGeraString.tedtNomArqMicEnter(Sender: TObject); The "Enter" in this method name indicates that you assigned the event handler to the OnEnter event of something (a button maybe). This means that whenever the mouse is moved over this button ("enter") the event fires. Usuall dialogs are displayed only when a "click" occurs, and this responsibility is in the OnClick event of the button. -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Need a good replacement for TMemo
Am 07.02.2024 um 22:42 schrieb Juha Manninen via lazarus: On Wed, Feb 7, 2024 at 2:46 PM John Landmesser via lazarus wrote: Please test RichMemo for Linux AND Windows! Long ago i tried to use RichMemo that worked for windows but not for linux! I cloned the GitHub repo (https://github.com/skalogryz/richmemo) and installed RichMemo. Now the code compiles also with LCL-GTK2 but still the component does not show up. Tested only with Linux so far. Strange. Tested this successfully this afternoon with Mint, and now with Manjaro and cocoa: can compile and run the sample projects (no thorough tests, though). What "does not show up mean"? No icon on the component palette? In this case you probably missed to install the designtime package which is a bit hidden in the "ide" folder among all the interface folders. -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Need a good replacement for TMemo
Am 07.02.2024 um 11:57 schrieb Juha Manninen via lazarus: I guess you mean delete from CCR. Yes please. Having such duplicates will always cause problems but won't bring any benefits. Done.-- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Need a good replacement for TMemo
Am 07.02.2024 um 07:49 schrieb Juha Manninen via lazarus: On Tue, Feb 6, 2024 at 11:31 PM Timothy Groves via lazarus wrote: ... and RichMemo won't work. (It will compile in, but then Lazarus crashes on startup with an Access Violation.) I updated lazarus-ccr repo and tried to install the RichMemo_design package. Lazarus does not crash but the RichMemo component does not show up either. It should be in the 'Common Controls' palette page. I tested with Lazarus trunk + LCL-GTK2 and LCL-QT5 widgetsets. For LCL-GTK2 I had to add {$define RMLCLTRUNK} in unit Gtk2RichMemo. It is used for function GetWidgetInfo() which was last edited by Mark in 2010. Maybe an IFDEF was needed for Lazarus trunk some 14 years ago but now the code should be updated. Does RichMemo installation work for somebody? Juha Yes. But you should not use the version in the CCR repository. You probably did not see the "readme.txt" which states that the ccr version is no longer maintained, development has been moved to github: https://github.com/skalogryz/richmemo. Or when you use the OPM version it will be working, too. I agree that having the out-dated richmemo in CCR is misleading. There are two options: I could delete that these files in OPM completely and keep only the readme, or I could copy the current github files over them (but I do not like the next step to become maintainer of the ccr version of richmemo...). -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] PasLibVLC based video player does not run on Linux...
Am 21.11.2023 um 21:17 schrieb Bo Berglund via lazarus: On Tue, 21 Nov 2023 19:29:58 +0100, Bo Berglund via lazarus wrote: - Set video speed --- To set the speed this is what I use in my code: procedure TfrmMain.btnFFClick(Sender: TObject); begin vlcPlayer.SetPlayRate(speSpeed.Value); end; It goes here: procedure TPasLibVlcPlayer.SetPlayRate(rate: Integer); begin if (p_mi = NIL) then exit; if (rate < 1) then exit; if (rate > 1000) then exit; libvlc_media_player_set_rate(p_mi, rate / 100); end; And it winds up here: (** * Set movie play rate * * param p_mi the Media Player * param rate movie play rate to set * return -1 if an error was detected, 0 otherwise (but even then, it might * not actually work depending on the underlying media protocol) *) var libvlc_media_player_set_rate : function( p_mi : libvlc_media_player_t_ptr; rate : Single // float ) : Integer; cdecl; Now I have searched in the test application tha uses the Lazarus lclvlc package and found this hidden inside the vlc.pp unit procedure TCustomVLCMediaPlayer.SetPlayRate(Avalue : Integer); begin if Assigned(FInstance) then begin if (Avalue< 1) then AValue:=1 else if (AValue>1000) then AValue:=1000; libvlc_media_player_set_rate(FInstance,AValue/100); end; end; So there is such a function inside but how can I use it in my top level code? I tried like this: procedure TfrmMainVlc.btnSpeedClick(Sender: TObject); var VideoSpeed: integer; begin VideoSpeed := speVideoSpeed.Value; Fplayer.SetPlayRate(VideoSpeed); end; But it generates an error: "identifier idents no member "SetPlayRate" So I tried to trace it further and found it in unit vlc: TCustomVLCMediaPlayer = Class(TComponent) private ... procedure SetPlayRate(AValue: Integer); ... So how can I get to use this function? I.e. how to publish it (it is private now)? If I trace it down to implementation it looks like this: procedure TCustomVLCMediaPlayer.SetPlayRate(Avalue : Integer); begin if Assigned(FInstance) then begin if (Avalue< 1) then AValue:=1 else if (AValue>1000) then AValue:=1000; libvlc_media_player_set_rate(FInstance,AValue/100); end; end; So all is there but not accessible for me... Private methods GetSomething and SetSomething usually are getters and setter for a property "Something". Looking at vlc.pp I can see that the methods GetPlayRate and SetPlayRate do exist, but a property "PlayRate" has not been defined. Just forgotten? Post a feature request to the fpc bugtracker to create this property.-- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] How to generate the fppkg.cnf file which Lazarus complains about when starting?
Am 16.11.2023 um 13:30 schrieb Bo Berglund via lazarus: 2) Retrieve the Lazarus 2.2.6 sources from GitLab IIRC, the fppkg check has been by-passed by Laz 3.0. So, please try to install the RC2 of v3, or a wait a short time until the final version will be released.-- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Compilation failed : PolygonNonZeroWindingRule unknown
Am 28.07.2023 um 15:10 schrieb Michael Van Canneyt via lazarus: It is Laz/Main (updated today), FPC 3.2.2 and clean rebuild (I have the option 'clean always' set in the lazarus build config). This is my standard development system. No problem with it. Where is this PolygonNonZeroWindingRule supposed to be defined ? For some time this was an addition to TLazCanvas.Polygon in Laz/2.3 and it had a different name which I cannot remember. Then I sent a patch for Polygon fill routines for TFpPixelCanvas which introduced the PolygonNonZeroWindingRule to FP/main (you committed it, https://gitlab.com/freepascal.org/fpc/source/-/issues/40286). I reworked TLazCanvas and removed the no-longer needed, old polygon fill of TLazCanvas in case of too-old FPC. So, there may be some combinations in the history of the Laz and FPC projects where there is a conflict, but there is definitely no conflict within Laz/main/fixes and FPC/main/fixes/3.2.2 -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Compilation failed : PolygonNonZeroWindingRule unknown
Am 28.07.2023 um 11:37 schrieb Michael Van Canneyt via lazarus: I updated my lazarus today, and the following fails: procedure TLazCanvas.Polygon(const Points: array of TPoint; Winding: Boolean); begin PolygonNonZeroWindingRule := Winding; inherited Polygon(Points); end; it does not know PolygonNonZeroWindingRule. I removed that line, and all compiles, but I suppose this is not the correct fix ? Last time there was a complaint about this I checked all combinations I have access to, and it was working. You are talking of Laz/main? In combination with which FPC? And on which OS? Did you try a *clean *rebuild of the Lazarus IDE?-- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] locate command for dBase
The attached project demonstrates that dbf.Locate works as expected. <> -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Microsft Access Date Select statment
Am 24.03.2023 um 21:48 schrieb Larry Dalton via lazarus: No matter how I format the beginning and ending dates, it doesn't work. If I format the dates in quoted strings ('20230101') or any variation, I get the incompatible types errors. Enclose the date/time by '#', put the date parts in year/month/day order and separate them by slashes: Query.SQL.Add('SELECT * FROM Events WHERE (StartTime >= #2019/01/15#) AND (StartTime < #2019/01/16#)'); But using query parameters is always the better way. -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Modifications to TurboPower IPro?
Am 23.03.2023 um 01:07 schrieb Don Siders via lazarus: My question: Is there a maintainer for IPro that I can offer the patches to? Or, should I post them here or to the issue tracker? It's probably me who did most of the changes recently. Although I do not consider myself as the "maintainer" (I think there is none at the moment), I can have a look. But I'd prefer to have your modifications in the bugtracker first, for better documentation. -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] converted Delphi 7 project: add new form not possible?
Am 24.02.2023 um 21:35 schrieb John Landmesser via lazarus: Hi, I tried to extend an existing and converted Delphi 7 project by adding new form to the converted Delphi 7 project. But that leads to an AV-error if i try to show this new form by code! I normally convert Delphi projects manually - it's more work, but I know what's happening then... And the manual conversion of your test project worked flawlessly. But anyway: When trying to use the IDE's Delphi converter I saw two problems: /1/ The newly added form is named Form1 (type TForm1) and this screws up the entire project since these identifiers already exist in the Delphi project. I can circumvent this issue when I close the IDE after conversion and create the new form only after a restart. /2/ But this does not prevent the other issue: The IDE refuses to add the new form to the list of auto-created forms, and therefore a call of "Form2.Show" in the OnClick handler of your button on Form1 must fail. I have no idea what prevents the new form from being auto-created. As a work-around I added the line "Application.CreateForm(TForm2, Form2);" to the project unit manually (and Unit2 to its uses clause). - This way it works. Please file a bug report. -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Screwed up Lazarus installation - how to make clean and start over?
Am 22.02.2023 um 21:15 schrieb Bo Berglund via lazarus: Now running that older version but with a partially installed package... bglcontrols.lpk is not installed but bgrabitmappack.lpk is. So the whole thing is partially installed. How can I *remove it totally* such that it is not existing at all in my system? I don't want this component to reinstall when I add another package and rebuild Lazarus. You uninstall a package in the "Package" > "Install/Uninstall packages" dialog. Select the package to be removed in the left list, click "Uninstall selection" and then "Save and Rebuild IDE". This will remove bglcontrols which is a runtime/designtime package, but it will not remove bgrabitmappack - it is a runtime package and thus is not compiled into the IDE. This cannot crash the compilation of the IDE. If you also want to get rid of it, go to "Package" > "Package Links", find it in the list, check it and click "Delete selected". This removes the path to the package from an internal list so that the IDE no longer knows where the package is (the files are still there, though - but you can delete them manually in the OS). -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Canvas.TextRec aligns to canvas and not rectangle for tlTop and taLeftJustify.
Am 19.02.2023 um 08:00 schrieb Russ via lazarus: When writing text to the canvas using Canvas.TextRec(), using layout tlTop and/or alignment taLeftJustify, the text is aligned to the canvas left and top edges instead of those edges of the text rectangle. The other layout and alignment cases work correctly. The sample code below illustrates this for all 9 possible combinations of layout and alignment. Changing lines 1302 and 1304 of canvas.inc fixes this problem: 1302: fRect.Left := X; --> fRect.Left := fRect.Left + X; 1304: fRect.Top := Y; --> fRect.Top := fRect.Top + Y; canvas.inc in Lazarus 2.2.4 and trunk are the same. Please don't change this - it will break numerous code. The reported behaviour is compatible with Delphi. What do you think are the additional x,y parameters good for? Delphi (and Lazarus) interprets them as the starting point of the text in the case where Layout is tlTop and Alignment is taLeftJustify, no matter what the Rect parameter is (which is used a clipping rectangle, though). God knows why x,y are not interpreted as an offset to the positions defined by Layout/Alignment directly. -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] odbc driver
Am 06.02.2023 um 14:27 schrieb Larry Dalton via lazarus: procedure TForm1.Button1Click(Sender: TObject); begin ODBCConnection1.Driver:='Microsoft Access Driver (*.mdb,*.accdb)'; ODBCCOnnection1.params.add('DBQ='+ExtractFilePath(Application.ExeName)+'MyAccess.accdb'); ODBCConnection1.Connected:=TRUE; ODBCConnection1.KeepConnection:=TRUE; Current MS Access Driver Microsoft Access Driver (*.mdb,*,accdb) Version 16:00 15928020006 I have the same code in one of my test projects, and it is working. A problem could be that you seem to use the 64-bit IDE, but your database could be 32bit: My Access version (2016) only produces 32-bit databases. I get the same error message when I try to open a 32-bit accdb file in the 64-bit application. -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] How to populate a TListView programatically
Am 17.11.2022 um 00:03 schrieb Aruna Hewapathirane via lazarus: Does anyone have any example code that populates a Listview component through code please? procedure TForm1.FormCreate(Sender: TObject); var item: TListItem; i: Integer; begin for i := 0 to 9 do begin item := ListView1.Items.Add; item.Caption := 'Item ' + IntToStr(i); item.SubItems.Add('Subitem ' + IntToStr(i) + '/1'); item.SubItems.Add('Subitem ' + IntToStr(i) + '/2'); item.ImageIndex := i; item.SubItemImages[0] := i+1; item.SubItemImages[1] := i+2; end; end; -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] How to fix slow screen refresh of TListbox?
Am 11.11.2022 um 16:29 schrieb Bo Berglund via lazarus: You see that the buffer contains the complete log history from the start... When the first block of data has arrived I would store the length of the buffer at this time. Then next time when new data come in, I would extract the "new data", i.e. the bytes between the stored length and the new length of the buffer and add them to the listbox. And store the current length for the next round. Etc... This avoids moving all the data to the listbox, which it already has, again and again. Because extraction of the individual lines in lbxRxdata.Items.Text := DataTxt is a length process. -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Lazarus does not find compiled package, why?
Am 30.10.2022 um 19:42 schrieb Bo Berglund via lazarus When I am at it: Is there a way on Windows to enumerate the existing serial ports so I can put a selector list on the form? I have the following code in one of my projects (Windows-only). It creates a comma-separated list to assigned to a ComboBox.Items.CommaText function GetSerialPortNames: string; var reg: TRegistry; l, v: TStringList; n: integer; begin l := TStringList.Create; v := TStringList.Create; reg := TRegistry.Create; try reg.Access := KEY_READ; reg.RootKey := HKEY_LOCAL_MACHINE; reg.OpenKey('\HARDWARE\DEVICEMAP\SERIALCOMM', false); reg.GetValueNames(l); for n := 0 to l.Count - 1 do v.Add(PChar(reg.ReadString(l[n]))); Result := v.CommaText; finally reg.Free; l.Free; v.Free; end; end; -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Strange issue with TImage and lazarus 2.2.2
Am 30.06.2022 um 17:03 schrieb Ondrej Pokorny via lazarus: On 30.06.2022 16:54, Werner Pamler via lazarus wrote: Am 30.06.2022 um 15:11 schrieb Mattias Gaertner via lazarus: Maybe instead of the GraphicClass.ClassName the first extension can be written. That means, that an old IDE cannot read the graphic. This will break Delphi compatibility, i.e. forms with an image in which the Picture has been loaded by Delphi will not be readable by Lazarus any more, and vice versa. Just checked again the signature that Delphi writes to the begin of the Picture.Data: it's the class name, not the extension. And what about writing the extension to the data end? Picture.Data = { 0B 54 49 6D 61 67 69 6E 67 50 4E 47 89 50 4E 47 0D 0A 1A 0A 00 00 00 0D 49 48 44 52 00 00 01 C6 11 T I m a g i n g P N G // 11 is the length byte 03 p n g That should be both Delphi and legacy Lazarus compatible if the reader reads only the defined count of bytes for the classname? But isn't this the same problem? When Vampyre is not installed, and the streamer sees the TImageingPNG classname there is no way how to find the end of the Picture.Data block. Newer Lazarus versions would first search the extension and if not found they search for the classname. Where's that? AFAICS, TPicture only looks for the classname. From Laz/main: procedure TPicture.ReadData(Stream: TStream); var GraphicClassName: Shortstring; NewGraphic: TGraphic; GraphicClass: TGraphicClass; ok: boolean; begin * Stream.Read(GraphicClassName[0], 1);** ** Stream.Read(GraphicClassName[1], length(GraphicClassName));* GraphicClass := GetPicFileFormats.FindClassName(GraphicClassName); NewGraphic := nil; if GraphicClass <> nil then begin NewGraphic := GraphicClass.Create; ok:=false; try NewGraphic.ReadData(Stream); ok:=true; finally if not ok then NewGraphic.Free; end; end; FGraphic.Free; FGraphic := NewGraphic; if NewGraphic <> nil then begin NewGraphic.OnChange := @Changed; NewGraphic.OnProgress := @Progress; end; Changed(Self); end; procedure TPicture.WriteData(Stream: TStream); var GraphicClassName: ShortString; begin with Stream do begin if Graphic <> nil then GraphicClassName := Graphic.ClassName else GraphicClassName := ''; * Write(GraphicClassName, Length(GraphicClassName) + 1);* if Graphic <> nil then Graphic.WriteData(Stream); end; end; -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Strange issue with TImage and lazarus 2.2.2
Am 30.06.2022 um 15:11 schrieb Mattias Gaertner via lazarus: Maybe instead of the GraphicClass.ClassName the first extension can be written. That means, that an old IDE cannot read the graphic. This will break Delphi compatibility, i.e. forms with an image in which the Picture has been loaded by Delphi will not be readable by Lazarus any more, and vice versa. Just checked again the signature that Delphi writes to the begin of the Picture.Data: it's the class name, not the extension. Or the vampyrlib defines type TPortableNetworkGraphic = class(TImagingPNG); and registers that in TPicture. Yes, that might be a solution at first sight. But I don't know what happens when a project requires Vampyre (i.e. registers this new TPortableNetworkgraphic), but a unit has only the ordinary graphics unit in its uses clause, i.e. accesses the old TPortableNetworkGraphic. -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Strange issue with TImage and lazarus 2.2.2
Am 26.06.2022 um 13:20 schrieb Luca Olivetti via lazarus: El 26/6/22 a les 11:36, Werner Pamler via lazarus ha escrit: Am 26.06.2022 um 10:54 schrieb Luca Olivetti via lazarus: VampyreImaginPackage 0.80 Mine is v0.82 which is the current version in OPM. According to their release notes there are changes related to PNG saving. My online package manager only has 0.80, the repository is http://packages.lazarus-ide.org Ah, I had installed the git version, and then OPM displays the installed version number... You can find the author's github version (v0.82) at https://github.com/galfar/imaginglib (if you don't use git, you can download also a zip from there). -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Strange issue with TImage and lazarus 2.2.2
Am 26.06.2022 um 10:54 schrieb Luca Olivetti via lazarus: VampyreImaginPackage 0.80 Mine is v0.82 which is the current version in OPM. According to their release notes there are changes related to PNG saving. -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Strange issue with TImage and lazarus 2.2.2
Am 26.06.2022 um 00:14 schrieb Luca Olivetti via lazarus: First observation after installing VampyreImagingPackageExt (the other package, VampyreImagingPackage, has no registration unit): I add TImage to a form and load the Lazarus "paw" to it. Works fine at designtime, but at runtime the image is empty. As the OP already noted Vampyre's TImagingPNG class is not found. This is because the Vampyre formats are registered only at designtime, but not at runtime of a project. It doesn't even work at designtime (see above). Try attached demo project. The "paw" image was inserted into a TImage after installation of Vampyre. All I had to do to get it working is to add Vampyre to the project requirements and to add ImagingComponents to the uses clause (or check the box "Add package unit to uses section" in the package options, then the formats will be registered for runtime automatically). Please note: I am not talking about the clipboard here, in fact I did not even investigate this because this is a different issue. <> -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Strange issue with TImage and lazarus 2.2.2
Am 24.06.2022 um 11:30 schrieb Mattias Gaertner via lazarus: On Fri, 24 Jun 2022 11:09:17 +0200 Werner Pamler via lazarus wrote: [...] It is my impression there is no way to register a new format in any way without modifying the sources of TPicture. TPicture: class function SupportsClipboardFormat(FormatID: TClipboardFormat): Boolean; class procedure RegisterFileFormat(const AnExtension, ADescription: string; AGraphicClass: TGraphicClass); class procedure RegisterClipboardFormat(FormatID: TClipboardFormat; AGraphicClass: TGraphicClass); class procedure UnregisterGraphicClass(AClass: TGraphicClass); class function FindGraphicClassWithFileExt(const Ext: string; ExceptionOnNotFound: boolean = true): TGraphicClass; Ah, of course. (I thought I had searched for "Register" in unit graphics...). Now I saw that Vampyre also uses these TPicture class methods to finally register their formats for TPicture. Thus, everything should be fine. But still the situation is not very satisfying. First observation after installing VampyreImagingPackageExt (the other package, VampyreImagingPackage, has no registration unit): I add TImage to a form and load the Lazarus "paw" to it. Works fine at designtime, but at runtime the image is empty. As the OP already noted Vampyre's TImagingPNG class is not found. This is because the Vampyre formats are registered only at designtime, but not at runtime of a project. But this can be fixed easily: After adding unit *ImagingComponents *to the uses clause, the "paw" is displayed at runtime, too. Next complication comes into play if the user decides to uninstall Vampyre. The problem is that every graphic type writes its class name to the lfm file in front of the image data (Picture.Data). So, when a picture was loaded into TImage while Vampyre was installed all the images are brand-marked by the Vampyre classes, e.g. TImagingPNG rather than TPortableNetworkGraphic: This is the part of the lfm written when Vampyre is installed (I am adding spaces to the hex data to see the digits: object Image1: TImage Left = 8 Height = 344 Top = 8 Width = 456 Picture.Data = { 0B 54 49 6D 61 67 69 6E 67 50 4E 47 89 50 4E 47 0D 0A 1A 0A 00 00 00 0D 49 48 44 52 00 00 01 C6 11 T I m a g i n g P N G // 11 is the length byte An image written by the LCL without Vampyre contains this: object Image1: TImage Left = 24 Height = 284 Top = 20 Width = 376 Picture.Data = { 17 54 50 6F 72 74 61 62 6C 65 4E 65 74 77 6F 72 6B 47 72 61 70 68 69 63 9A 3D 00 00 89 50 4E 47 23 T P o r t a b l e N e t w o r k G r a p h i c When such a project is loaded into a Lazarus without Vampyre at first the VampyreImagingPackage and/or VampyreImagingPackageExt requirements must be removed from the project. But, of course, the Vampyre image class signatures are still in the lfm file, and the IDE refuses to load the form with this error: Unable to find the component class "TForm1". It is not registered via RegisterClass and no lfm was found. It is needed by unit: D:\Prog_Lazarus\tests\_images\vampyre\format_registration\vampyre_stripped\unit1.lfm I think this is the most confusing part of that issue. If it would say "Unable to find class "TImagingPNG"" it would be much clearer. However, I don't think that much can be done against that. There is always a risk when using third-party components that irreversible changes could occur. Hmm, well, somebody could write a tool the fix the image classname header in the lfm's Picture.Data. Werner -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Strange issue with TImage and lazarus 2.2.2
Vampyre has its own file format registration system. There is a class TImageFileFormat, and there is a list ImageFileFormats which stores the parameters for all known file formats. Each file format has a reader/writer unit, and these units add the file format to the ImageFileFormatsList if such a unit exists in a uses clause. FPC has a similar registration system, it registeres its own reader/writers in a similar list, ImageHandlers. Vampyre does not take care of the FPC image type registration. But that's not the problem... To make things worse, LCL has another registration system for the image types known to TPicture. There is a list TPicFileFormatsList which stores pointers to TPicFileFormat records. The instance of this list, PicFileFormats, is accessible only via a factory function GetPicFileformats which is not accessible from the outside. The formats known to the TPicture are added in the constructor of TPicFileFormatsList, again fully hidden inside the picture.inc. It is my impression there is no way to register a new format in any way without modifying the sources of TPicture. This is bad... In my opinion, the TPicture file format registration should be moved into the interface part of the graphics unit so that the user can add his own image formats. Then Vampyre could call GetPicFileFormats.Add and provide the information for its own readers/writers; if there are duplicate formats the old ones should be removed in the Add call. Werner -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Component palette enhancements
Am 06.04.2022 um 12:56 schrieb Michael Van Canneyt via lazarus: 3. Please add a search edit in the component palette, as delphi has it: typing in that edit should reduce the visible tabs to show only tabs that have a component with the typed text in the classname, just like the one on the component window... (the component window is IMO not really usable if you are not using a docked IDE) Sorry what do you mean with "component window"? There's one in menu "View" > "Components" (this is not the one which opens by clicking the down-arrow at the right of the component palette), and this seems to do exactly what you require after checking "Keep open". -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Component icons howto ?
Am 30.03.2022 um 11:21 schrieb Ondrej Pokorny via lazarus: I am not against extending the component icon loading to handle a different file name convention. As Delphi uses the same concept that you prefer https://blogs.embarcadero.com/new-in-10-2-2-component-icons/ , if the Lazarus code should be extended then definitely to support the Delphi way: RCDATA TLabel32_PNG "tlabel32.png" The resource name is the component class name plus the px-value postfix (16, 24, 32, ...) and "_PNG" in case of a png file. Yes, I am absolutely OK with it as an alternative naming convention for the component palette because we probably do not want to give up the current naming convention due to the effort needed for renaming all the files and due to legacy compatibility. But if others agree and somebody is willing to take the maintenance effort, we could also deprecate the current naming convention and remove it in the 2nd-to-come stable version. Lazarus had the High-DPI support before Delphi so there was no chance for us to know what Delphi would eventually choose, so having the Delphi-convention as an alternative was inevitable anyway. Not convinced that this offers a significant advantage. The component writer has to consider so many differences to Delphi anyway, so I would not care about a different icon naming convention. I am against deprecating the old naming scheme because we would have to rename thousands of icons (and their svg source files). Rather than that, I think the effort should be put into support of svg images. -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Component icons howto ?
Am 29.03.2022 um 18:37 schrieb Michael Van Canneyt: So you must always register the three images. You are not forced to. But when you provide only the standard size and run the IDE at 200% the IDE will upscale the 24x24 image to double size, and the icon will become blurry - just as it was in the days before Ondrej implemented all these scaling functions. (BTW: a long time before Delphi which seems to support High-Dpi only now in the recent release). As a corollary: what's with the strange names ? Why not use the size of the icon in the name, that would be a lot clearer IMHO? That's the way it was decided. One advantage is that when images are needed for other purposes, but at different sizes (e.g. the icons in the message window which are much smaller) the scaling procedure can still be the same Not sure I follow the logic ? I don't know the actual procedure names ATM, but imagine that when the message window needs a "warning" icon (which is - say - 12x12 at 96ppi) then the scaling procedure at 192ppi only needs to look for "warning_200.png". If the exact image size would have been included in the file name instead ("warning_24x24.png"), it would have to know the size of the base image at 96ppi in order to select the right image. A little simplification. I looked in the WIKI but could not find any relevant info. https://wiki.lazarus.freepascal.org/How_To_Write_Lazarus_Component#Step_3%3A_Create_icons_for_the_package Hehe, the history shows you sneaked in the different sizes today. I checked only last week, so I was pretty sure the info was outdated ;-) I had written this part of the wiki already in 2018, so it definitely was not outdated. I just noticed that it was missing some basic requirements (like component name = image name) and decided to rewrite the paragraph. OK, I will look at the SVG files. It didn't occur to me I can remove the text. Or possibly simply change it to what I need. I am attaching the three "database" png images extracted from the TDbf svgs without the text, in case you have problems with InkScape (which definitely will not win the prize of the most user-friendly software).-- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Component icons howto ?
Am 29.03.2022 um 15:50 schrieb Michael Van Canneyt via lazarus: I see there are 3 icons for every standard component: mycomponent, mycomponent_150 and mycomponent_200 How does the IDE pick which image it needs ? The basic image name must match the component name (including the "T"). The image without an appendix is used for standard resolution (96 ppi, 100%), the image with appendix "_150" is used for 144 ppi (150%), and the image with appendix "_200" is used for 192 ppi (200%) As a corollary: what's with the strange names ? Why not use the size of the icon in the name, that would be a lot clearer IMHO? That's the way it was decided. One advantage is that when images are needed for other purposes, but at different sizes (e.g. the icons in the message window which are much smaller) the scaling procedure can still be the same I looked in the WIKI but could not find any relevant info. https://wiki.lazarus.freepascal.org/How_To_Write_Lazarus_Component#Step_3%3A_Create_icons_for_the_package There is also a short chapter in the Lazarus Handbook vol 2, page 717. 2. I would like to create icons for some new dataset descendents. The icons for the well-known datasets all have a text on it. Where can I find the icon without a text on it ? Roland Hahn, who designed most of the new icons, recommends to paint the images in svg format (using InkScape for example). For there you can export the required images in any size as png. He does create three differently sized svg images for fine-tuning, but in my own work I usually draw only one size, e.g 36x36. You can find the svg source files from which all (well - most) of our images are created on CCR (folder "image_sources"). The TDbf database icons, for example, are located in (ccr)/image_sources/lazarus/components/tdbf etc (like in the IDE folder). From there you can delete or edit the text overlays. -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] ODBC configurations for Excel on Lazarus
Am 11.03.2022 um 23:43 schrieb Michael Van Canneyt via lazarus: Cool, I didn't know that one yet ! :-) Is there an example for it's use ? Given the way companies often rape excel sheets, this component will make life a lot easier for many things :-) There are two examples in folder examples/dataset of the fpspreadsheet installation. Note that it was not intended to carry database technology into the main laz_fpspreadsheet package, therefore, the dataset was put into a separate package, laz_fpspreadsheet_dataset, which must be installed to test the two demo projects. -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] ODBC configurations for Excel on Lazarus
Am 11.03.2022 um 23:03 schrieb Michael Van Canneyt via lazarus: Would it not be easier to use fpspreadsheet ? Accessing excel through odbc seems a rather roundabout way. Yes, definitely (https://wiki.lazarus.freepascal.org/FPSpreadsheet). In the most recent release there is even a TsWorksheetDataset which allows to access the spreadsheet in a database way. -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] How to convert Delphi program with TRichEdit?
Am 09.12.2021 um 16:19 schrieb Bo Berglund via lazarus: How can I use this? Very easy: just load the file procedure TForm1.FormCreate(Sender: TObject); begin hex := TMpHexEditor.Create(self); hex.Parent := self; hex.Align := alClient; hex.LoadFromFile('Project1.exe'); end; -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] TextHint in TComboBox
Am 15.11.2021 um 16:37 schrieb Marcos Douglas B. Santos via lazarus: I need to implement a TextHint property—as we have in TEdit— in a component inherited from TComboBox. Doesn't matter if it will be "emulated" or not. My first thought was copying from TEdit... however, is this the better way? Maybe sharing this code, in Lazarus code, for other components, would be a better design instead of inside TEdit? It's already there, at least in Laz 2.2+. -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] TMainMenu missing header
Am 06.11.2021 um 16:58 schrieb Larry Dalton via lazarus: I recently upgraded to 2.2.0RC1. After recompiling several applications I noticed that my TMainMenu headings have disappeared. To use them I had to change the class to TPopupmenu and tie them to TButtons. What caused this? What are the "headings" of the MainMenu? Is the MainMenu listed in the Menu property of the form? -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] test
did receive the test Am 10.06.2021 um 15:47 schrieb Marc Weustink via lazarus: test -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] lazarus trunc IDE compile error
Am 04.01.2021 um 19:32 schrieb Martin Frb via lazarus: On 04/01/2021 19:05, John Landmesser via lazarus wrote: Something went wrong? last running trunc version: Lazarus 2.1.0 r64270 FPC 3.2.0 x86_64-linux-gtk2 Same with FPC 3.0.4 / 64bit / windows Sorry, the initial fix for FPC-trunk introduced another issue with FPC 3.2. Should work now. -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Creating packages - what to include?
You are talking of runtime code only. Here are instructions how to create a Lazarus runtime package (I never created an FPC package...): Go to "Package" > "New package", specify name and location of the new package, an empty package will be created automatically. In the package editor which opens right-click on "Files" and add all the files which are supposed to be contained in the package. When the units that you need depend on other units found in other packages you must add these other packages to the node "Required Packages" (right-click, "Add"). Then click "Compile". When everything is correct, go to "options" in the package editor, and in "IDE Integration" select "Runtime package". This means that the package is not installed into the IDE. Save, of course. In order to use this runtime package in a project, open the Project Inspector, right-click on "Required Packages" and select your new package to be added to the project tree. Now you can "use" all units of this package. When you are on a new Lazarus installation the IDE does not yet know your package. Go to "Package" > "Open Package File (*.lpk)". That's all to be done so that the IDE knows the path to the package. When you compile your project the package will be compiled as well. Of course you can click "Compile" also in the Package Editor to make sure that your package is correct in the new installation. There is no need to click "Use" > "Install" for a runtime package. Coming from Delphi you may be tempted to extend the unit path by the path to your package units. Do not do this - you will have lots of trouble. The Lazarus package concept does not require you to set any paths. -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] lHelp improvements
Am 28.12.2020 um 02:03 schrieb Mattias Gaertner via lazarus: What package opens hh.exe in Lazarus? No special package needed. As I described in https://wiki.freepascal.org/Installing_Help_in_the_IDE#Installing_CHM_help_.28Lazarus_1.0_and_later.29, hh.exe (the Windows help viewer) can be made to display the chm files instead of lhelp. -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Installing custom control in Lazarus - where can I find it?
Am 27.08.2020 um 22:51 schrieb Bo Berglund via lazarus: Now the strangest thing is that in this process Lazarus has completely mangled the EasyListView.pas source file so it now only has this content wheras the original was 27 kbytes: I guess the component code is in unit EasyListView.pas and the package is named EasyListview.lpk. This is bad because installation creates the "package unit" with the same name as the package file, i.e. it overwrites your component unit. Remedy: give the package a different, more "package-like" name, e.g. EasyListViewPkg, or LazEasyListView (also to distinguish from any Delphy package). Carefully check the contents of the new LazEasyListView.lpk file to make sure that the old package name is not mentioned any more (or recreate the package from the start - this is not difficult and almost no work). IIRC, I had tried to convert this component some time ago, too, and found it very difficult. Well, maybe because my intention was to make it cross-platform. -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] How to stop the ChildSizing?
Am 12.06.2020 um 00:36 schrieb Martin Grajcar via lazarus: There's a TPage containing a few components I want to position and size manually (sort of position: 'absolute' in CSS). It works well, but then the LCL comes and overrides my work I've played with Anchors, AutoSize and Align of both the parent (TPage) and child components for quite a while, but nothing helped. I finally sort of solved it by overriding SetBound in the children, so that only my own calls get honoured. It works, but it isn't possible with standard components, so I'm looking for something better. Any idea? I don't know what you were doing, but normally the components do not move and resize, they remain at their position relative to the top and left edges of their parent. If - as the title of your message suggests - you misconfigured ChildSizing you should set ChildSizing.Layout to cclNone (for the Parent), and all controls should be movable again. -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Tool to make icons ?
Am 21.05.2020 um 18:06 schrieb Michael Van Canneyt via lazarus: Now I still need to learn some Inkscape, but that's for later :-) I feel with you... Unfortunately every graphics program has its own short cuts and places in the menus and toolbars, and yes, Inkscape, like the well-respsected Gimp, is not a master-piece in user-guidance, at least for my way of working. Since the icons are stored in universal svg, however, you can also switch you other vector programs instead, like CorelDraw or LibreOffice Draw. But they have other issues... -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Tool to make icons ?
Am 21.05.2020 um 17:45 schrieb Michael Van Canneyt via lazarus: Where are the SVG sources for the icons ? https://sourceforge.net/p/lazarus-ccr/svn/HEAD/tree/image_sources/ -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Tool to make icons ?
Am 21.05.2020 um 16:13 schrieb Michael Van Canneyt via lazarus: What is the tool used to make icons for standard Lazarus components ? Roland Hahn who designed most of the palette and a good part of the toolbar icons is using Inkscape. This may be a bit surprising because Inkscape is a vector graphics program for svg drawings, but icons are bitmaps. The main advantage is that every feature of the drawing is available as a separate object, not merged together like in the bitmap programs (unless layers are supported). Producing svg vector drawings it is enough to do an image once and export the three resolutions (95ppi, 144pii, 192ppi) from that single source file. Well - in principle because the 150% image usually becomes a bit blurred this way. Roland goes even a step further and does every size individually in order to fine-tune details. And the final advantage is that we have svg files for the time when a future Lazarus will support to scalable svg images. In the meantime I tried Inkscape myself for some of my own components, and yes, once I learned the basic operations it is really well-suited. Should not lazarus come out of the box with a basic tool that allows you to create component icons with the correct sizes ? It really would have to be an advanced program, most of all supporting layers, and I think that this would be too much work. Besides GreenFish there is also LazPaint, both written with Lazarus and are very good. -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] TComboBox.ReadOnly
Am 02.05.2020 um 16:15 schrieb Juha Manninen via lazarus: Ok, I removed it in r63112. Something must be screwed up in TComboboxEx. Don't worry, not by the removal of the ReadOnly property, but it must have been around for a long time since the beginning: This component introduces a new Style type: TComboboxExStyle = (csExDropDown, csExSimple, csExDropDownList). In Delphi it is possible to type text into the control when the Style is csExDropDown or csExSimple, but in Lazarus this is not possible, the control behaves like csExDropDownList in all cases (except for the grayed appearance, in Windows). And in Delphi the Style with csExSimple looks like a simple TEdit, while in Lazarus it has the dropdown arrow, like the csExDropdown(List) Style. I tested this on Windows, and Linux gtk2 and qt5. -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] TBufDataset issues
There's another design-time related issue with AutoInc fields: see forum post https://forum.lazarus.freepascal.org/index.php/topic,49614.msg360102.html#msg360102. The post contains a small demo to show the issue. -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] TBufDataset issues
Am 30.04.2020 um 10:45 schrieb Michael Van Canneyt via lazarus: I added several menus: - Create dataset (what you need) - Save data to file (allows to save data in memory to file) - Load data from file (allows to load data from a file into memory) - Copy data from another dataset (what it says on the tin :-)) Thank you. (2) Persistent fields: Wanting to create persistent fields at design time I do this: Make sure that the BufDataset is active. Right-click on the component to add the Fields Editor. I see the fields created. But how do I make them persistent? In Delphi I select both fields and click the '+'. Here the field list which opens is empty and the "Create" button is disabled. In other datasets everything is working correctly here, but TBufDataset seems to be incomplete. Works fine here, be sure to set correct properties for the fields you add. If any of the fields has incorrectly configured properties, it won't work. But I did this when the dataset was not yet active. Maybe that is your problem. Although I had it working some time after I had sent my mail I now have the same issue again and I don't know why- see attached demo. I had entered two field defs, clicked the new "CreateDataset" option (which automatically set the Dataset to Active, however, not immediately, only after clicking somewhere else). I saved the project in this state. When you load it into Lazarus you must first create the dataset again, because i did not specify a filename since it must be absolute and won't fit to your directory structure. The FieldsEditor and trying to add persistent fields always leads me to the state with the empty field list and disabled "Create" button. I should note also that when I experimented with FileName specified the IDE was in a pretty unstable state and crashed easily. I cannot reproduce, however, what I did exactly. But it happened rather frequently, at some stage the IDE crashed when I tried to click off the Active property, but this was gone after I reloaded the project. <> -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
[Lazarus] TBufDataset issues
Playing with TBufDataset I came across some issues: (1) Creating fields at designtime: In order to create fields at designtime to a new TBufDataset component I add FieldDefs by clicking the '...' next to "FieldDefs" in the Object Inspector and fill in the required data. But there is no way to really *create* the dataset. At runtime I would call BufDataset.CreateDataset - but this is not accessible at designtime. In Delphi's ClientDataset there is an item "Create dataset" in the context menu of the dataset. This seems to be missing here. OK - I can create the dataset at runtime at least. This leads to the second problem: (2) Persistent fields: Wanting to create persistent fields at design time I do this: Make sure that the BufDataset is active. Right-click on the component to add the Fields Editor. I see the fields created. But how do I make them persistent? In Delphi I select both fields and click the '+'. Here the field list which opens is empty and the "Create" button is disabled. In other datasets everything is working correctly here, but TBufDataset seems to be incomplete. Michael, is this your component? Could you have a look? I can write a bug report, if necessary. -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Add your own fpmake packages to the fppkg-repository
Am 17.04.2020 um 13:43 schrieb Joost van der Sluis via lazarus: Everyone can log-in with a bug-tracker of forum account. Note that every fpc-version has it's own repository. And that there are two flavours: testing and production. Everyone can add packages to testing. For now adding to production is only possible for administrators. Does this mean that every forum user can post fpc packages? Will there be a review? I guess we will drown in garbage. Forum users, don't misunderstand me, I am not saying that you are posting poor software in general, but we've had some evil-minded guys out there in the forum. Sorry I am thinking of the worst: will there be access rights so that a poster can only modify his own packages? (CCR for example does not have them - we're lucky that nobody has abused it so far, but here not every forum user has access). -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Freepascal/Lazarus forum and Lazarus website outage wrap-up
Thank you for all the effort. -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] IDE rebuild fails on raspi4
Am 07.02.2020 um 11:16 schrieb Tom Lisjac via lazarus: Trying to get Lazarus working on the raspberry pi 4 with the latest Raspbian (Debian 10.2). Installed 2.0.0+dfsg-2 with synaptic from the Raspbian repos, but haven't been able to install components and rebuild the IDE, due to: VirtualTrees.pas(70,3) Fatal: Cannot find OleUtils used by VirtualTrees. Got past a similar issue with fpdebug buy compiling it manually, but the VirtualTrees source shows OleUtils inside a Windows ifdef which isn't going to resolve on the pi: unit VirtualTrees; {$ifdef Windows} ... OleUtils, I checked several versions of the Lazarus port on Luiz's github ((https://github.com/blikblum/VirtualTreeView-Lazarus - the version included in Lazarus is based on v5)), and they all have OleUtils outside the Windows ifdef, the code is: uses {$ifdef Windows} Windows, ActiveX, CommCtrl, {$else} laz.FakeActiveX, {$endif} OleUtils, In fact, OleUtils is a unit which provides some Windows-functionality for other widgetsets. However, it does not belong the VirtualTreeViews - it is contained in the lclextensions package which you must compile first, before touching VirtualTreeViews. Maybe it is sufficient to simply do a clean rebuild of the IDE. -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Duplicate items in xml doc files
Am 19.12.2019 um 20:48 schrieb Don Siders via lazarus: That's a possibility. Mistakes happen. But in looking at the file there are several duplicates. I don't think I would have been that careless. Just to make sure: It was never my intention to say that you did. I edit manually too. It's neither difficult nor error prone. I get exactly the FP Doc markup that I feel is appropriate. Now we have a problem. FPDocEditor and LazDocEditor ARE distributed with Lazarus, and nobody is prevented from using them. So, when I modify one of your recent xml files using FPCDocEditor, there's a chance that FPDocEditor will destroy your markup and add numerous svn diffs again. I am using the IDE to navigate source and determine ancestry. I use Atom to edit the FP Doc XML description files (due to its support for XML syntax and "XML-completion" facilities). I use Tidy to validate the XML content. I use ASpell to catch spelling mistakes and fat-fingered typing. A long tool-chain. Only enthusiast like you will do that. I really think that in particular FPDocEditor, maybe also LazDocEditor, is an important tool for the occasional user. But it should be re-worked to produce consistent and svn-friendly xml files. -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Duplicate items in xml doc files
Am 18.12.2019 um 13:11 schrieb Marco van de Voort via lazarus: A lemma in the help that is just "polybezier", and not TCanvas.polybezier. I assume it is a global procedure The lemma has Source position: winapih.inc line 211 I looked at TCanvas.PolyBezier (the help text is in graphics.xml). The help text for the lemma that you mention is in interfacebase.xml and is structured correctly (in my opinion) because is does not contain duplicate xml nodes, and the non-canvas PolyBezier does display the description in the mouse-over hint. (But your note reminds me to adapt the docs change that I made in graphics.xml for issue https://bugs.freepascal.org/view.php?id=36452 also in interfacebase.xml.) -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Duplicate items in xml doc files
Am 18.12.2019 um 16:36 schrieb Werner Pamler via lazarus: Am 18.12.2019 um 16:29 schrieb Michael Van Canneyt via lazarus: That's why the docs of fpc have the checkxml tool, which is used to quickly check the XML structure after editing, before committing or building. Thanks - I did not know that. Where is this tool? I did a search through all fpc folders and did not find it. -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Duplicate items in xml doc files
Am 18.12.2019 um 16:29 schrieb Michael Van Canneyt via lazarus: That's why the docs of fpc have the checkxml tool, which is used to quickly check the XML structure after editing, before committing or building. Thanks - I did not know that. -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Duplicate items in xml doc files
Disregarding LazFPDoc for the moment: I do like the FPDoc Editor because once I understood its principle I could simply edit existing and create new help items. And moving the mouse over the corresponding keywords in the text gave an immediate feedback. But now I am quite confused because it does not necessarily consider all nodes in a file. As we see here, there are two TCanvas.PolyBezier nodes in the same file. The FPDocEditor uses only the first node and ignores the second one; and the mouse-over hint is constructed also from the first node only -- the (larger) work somebody else has put into the second one is forgotten. I wonder how it was possible that a second node could be added at all. Carelessness of the user manually editing the file? I suppose that it is possible to merge the two nodes and remove the duplicates manually. Correct? Another issue with the FPDocEditor is that it frequently writes back to the xml file although nothing has been changed. Unfortunately it formats the xml text in its own way which causes a lot of text changes and pollutes the svn history. The attached TortoiseMerge screenshot shows the diffs induced by opening lclintf.inc in Lazarus with FPDocEditor and clicking on some LCLIntf-related keywords in the source files of winapi.inc and winapih.inc: a huge number of lines is changed due to replacement of empty expanded xml tags such as by their short forms (see the left gutter for an overview of all changes). This is an extreme case, normally I have seen only changes at a few places. I cannot tell what exactly causes the different behavior. Can both tools, FPDoc Editor and LazDocEditor, be used to edit help information? Or is it recommended to do this manually (which is extremely error-prone)? For FPC, I only edit manually. I don't see why this would be error prone ? Typos! Once I tried to build the html help files myself and it failed because somebody had forgotten the slash in the end tag of some element. I can imagine dozens of such errors. And there is no feedback, only when someone at some time in the future builds the help files again and is annoyed by the crash due to somebody else's mistakes. Therefore, an easy-to use editing tool is essential if we want the (poor) help files of Lazarus to be improved. BTW: User Don Siders is doing an excellent job in continuously submitting patches for the xml files. The help files have improved considerably since then (I wonder how he is editing the xml files.) -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Duplicate items in xml doc files
Am 18.12.2019 um 11:05 schrieb Marco van de Voort via lazarus: Op 2019-12-17 om 22:52 schreef Werner Pamler via lazarus: Fixing a docs-related issue today (https://bugs.freepascal.org/view.php?id=36452), I noticed that the entry for TCanvas.PolyBezier almost does not have any elements when the item is displayed in the *FPDoc editor* of Lazarus, i.e. I do "View" > "FPDoc Editor" and place the cursor in the normal source code window on the PolyBezier identifier - then the FPDoc editor displays only the "short" text, all other tabs are empty. On the other hand, the full chm file contains a lot more information (https://lazarus-ccr.sourceforge.io/docs/lcl/graphics/tcanvas.polybezier.html), among it the description node which is the topic of that bug report. How is this possible? You are sure you really have TCanvas.polybezier in the editor, and not the polybezier global? (at least I see a polybezier global in the last CHM snapshot) No, I am not sure. I even don't know what "polybezier global" is... -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
[Lazarus] Duplicate items in xml doc files
Fixing a docs-related issue today (https://bugs.freepascal.org/view.php?id=36452), I noticed that the entry for TCanvas.PolyBezier almost does not have any elements when the item is displayed in the *FPDoc editor* of Lazarus, i.e. I do "View" > "FPDoc Editor" and place the cursor in the normal source code window on the PolyBezier identifier - then the FPDoc editor displays only the "short" text, all other tabs are empty. On the other hand, the full chm file contains a lot more information (https://lazarus-ccr.sourceforge.io/docs/lcl/graphics/tcanvas.polybezier.html), among it the description node which is the topic of that bug report. How is this possible? On the other hand, opening the file graphics.xml in the *LazDocEditor *and finding the TCanvas node shows two PolyBezier nodes. The first one contains the text from the chm file, the second one has subnodes for the parameters of the function - there is no text assigned to them, but some of them are listed twice. There are other help items which show the same phenomenon: Chord, Polygon, PolyLine, RadialPie, where Polygon even has three entries! Is this correct? If yes it is at least very confusing and makes the LazDocEditor possibly a dangerous tool because the xml file might be damaged when text is added to the wrong node. Can both tools, FPDoc Editor and LazDocEditor, be used to edit help information? Or is it recommended to do this manually (which is extremely error-prone)? And why are there so many empty lines? If they were added by either FPDocEditor or LazDocEditor (and not by the author manually) then these tools do not look very mature. Probably related: the source code mouse-over hint of PolyBezier shows only the "short" text, not the full "description". Werner -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] The future of the Lazarus IDE
Once having voted the current results are displayed. But when I want to see later how the poll has evolved I can only vote again -- that's probably not what you intend. Either add a button to display the current results, or don't display results at all until the poll has ended. -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] The future of the Lazarus IDE
I am missing the option "No change wanted towards this direction". Without this option the poll is biased. -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] LCL Grids: not scalable line width
Am 06.10.2019 um 12:14 schrieb AlexeyT via lazarus: IMO I have found place where width of canvas line is not scaled to current DPI. procedure TCustomGrid.ChangeCursor(ACursor: TCursor; ... Canvas.Pen.Width:=3; ... Canvas.Pen.Width:=1; AFAIK, pen widths so far are not scaled at all. If they were, pen.Width=1 should be scaled, too, and this can have a detrimental effect on line styles and drawing speed, at least on Windows. -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Cross-platform project. Font sizes not the same....
AFIK there is no simple way to force fonts to use the same size (unless you specify a given font size - which however may not be the size of some theme of one of the target systems which will make your program look "strange"). The only way I know to make forms cross-platform is to use auto-sizing as much as possible. And don't position controls absolutely, but attach them to their neighbors by means of the AnchorEditor. Avoid frozen form sizes -- the user must be able to readjust the size if something is awfully wrong. -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] TListView - how to make selected line stay selected?
Did you set HideSelection to false? -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Maybe it's TreeView hi-dpi bug on Linux?
Am 02.08.2019 um 21:18 schrieb AlexeyT via lazarus: I cannot test hi-dpi on Linux. Why not? Just set the DPI of your system to something higher than 96, maybe 120 or at most 144. Beyond 144dpi there will not be much left on the screen to work on... -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
[Lazarus] wiki image update error
Trying to replace some outdated images in the wiki by newer versions I noticed a crash of the wiki software: My actions: * Click on image in wiki article to be replaced * Click "Upload a new version of this file" * "Source file name" / "Browse" - navigate to new file on HD * Add description to box "File changes" * Click "Upload file" * This results in the following error message [2db5b40f8e03500988820945] /Special:Upload Wikimedia\Rdbms\DBQueryError from line 1457 of /srv/www/lazaruswiki/includes/libs/rdbms/database/Database.php: A database query error has occurred. Did you forget to run your application's database schema updater after upgrading? Query: RELEASE SAVEPOINT `wikimedia_rdbms_atomic1` Function: LocalFile::recordUpload2 Error: 1305 SAVEPOINT wikimedia_rdbms_atomic1 does not exist (localhost) Backtrace: #0 /srv/www/lazaruswiki/includes/libs/rdbms/database/Database.php(1427): Wikimedia\Rdbms\Database->makeQueryException(string, integer, string, string) #1 /srv/www/lazaruswiki/includes/libs/rdbms/database/Database.php(1200): Wikimedia\Rdbms\Database->reportQueryError(string, integer, string, string, boolean) #2 /srv/www/lazaruswiki/includes/libs/rdbms/database/Database.php(3498): Wikimedia\Rdbms\Database->query(string, string) #3 /srv/www/lazaruswiki/includes/libs/rdbms/database/Database.php(3584): Wikimedia\Rdbms\Database->doReleaseSavepoint(string, string) #4 /srv/www/lazaruswiki/includes/libs/rdbms/database/Database.php(2953): Wikimedia\Rdbms\Database->endAtomic(string) #5 /srv/www/lazaruswiki/includes/libs/rdbms/database/Database.php(2880): Wikimedia\Rdbms\Database->nonNativeInsertSelect(string, array, array, array, string, array, array, array) #6 /srv/www/lazaruswiki/includes/filerepo/file/LocalFile.php(1606): Wikimedia\Rdbms\Database->insertSelect(string, array, array, array, string, array, array, array) #7 /srv/www/lazaruswiki/includes/filerepo/file/LocalFile.php(1364): LocalFile->recordUpload2(string, string, boolean, array, string, User, array) #8 /srv/www/lazaruswiki/includes/upload/UploadBase.php(868): LocalFile->upload(string, string, boolean, integer, array, boolean, User, array) #9 /srv/www/lazaruswiki/includes/specials/SpecialUpload.php(567): UploadBase->performUpload(string, boolean, boolean, User, array) #10 /srv/www/lazaruswiki/includes/specials/SpecialUpload.php(207): SpecialUpload->processUpload() #11 /srv/www/lazaruswiki/includes/specialpage/SpecialPage.php(565): SpecialUpload->execute(NULL) #12 /srv/www/lazaruswiki/includes/specialpage/SpecialPageFactory.php(568): SpecialPage->run(NULL) #13 /srv/www/lazaruswiki/includes/MediaWiki.php(288): SpecialPageFactory::executePath(Title, RequestContext) #14 /srv/www/lazaruswiki/includes/MediaWiki.php(861): MediaWiki->performRequest() #15 /srv/www/lazaruswiki/includes/MediaWiki.php(524): MediaWiki->main() #16 /srv/www/lazaruswiki/index.php(42): MediaWiki->run() #17 {main} -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] It is a beautiful day...
Am 20.07.2019 um 20:05 schrieb Mattias Gaertner via lazarus: On Sat, 20 Jul 2019 19:37:23 +0200 Werner Pamler via lazarus wrote: Am 20.07.2019 um 15:43 schrieb Mattias Gaertner via lazarus: On Sat, 20 Jul 2019 15:32:05 +0200 Werner Pamler via lazarus wrote: Am 20.07.2019 um 12:15 schrieb Mattias Gaertner via lazarus: On Sat, 20 Jul 2019 11:59:56 +0200 Werner Pamler via lazarus wrote: You could create a meta package and install that. Excuse my ignorance. , But what is a "meta package"? A package which only contains requirements of other packages? Yes When installing the new meta package "jvcl_all" which contains all designtime packages I get a message "The package jvcl_all does not have any "Register" procedure which typically means it does not provide any IDE addon. Installing it will probably only increase the size of the IDE and may even make it unstable." and I am prompted to either "Install it, I like the fat" or to "Cancel". How can I avoid this? Do I have to provide a dummy registration unit? It should not warn in this case. I fixed the bug. Thanks. It works correctly now. -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] It is a beautiful day...
Am 20.07.2019 um 15:43 schrieb Mattias Gaertner via lazarus: On Sat, 20 Jul 2019 15:32:05 +0200 Werner Pamler via lazarus wrote: Am 20.07.2019 um 12:15 schrieb Mattias Gaertner via lazarus: On Sat, 20 Jul 2019 11:59:56 +0200 Werner Pamler via lazarus wrote: You could create a meta package and install that. Excuse my ignorance. , But what is a "meta package"? A package which only contains requirements of other packages? Yes When installing the new meta package "jvcl_all" which contains all designtime packages I get a message "The package jvcl_all does not have any "Register" procedure which typically means it does not provide any IDE addon. Installing it will probably only increase the size of the IDE and may even make it unstable." and I am prompted to either "Install it, I like the fat" or to "Cancel". How can I avoid this? Do I have to provide a dummy registration unit? What does it have to look like? -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] It is a beautiful day...
Am 20.07.2019 um 12:15 schrieb Mattias Gaertner via lazarus: On Sat, 20 Jul 2019 11:59:56 +0200 Werner Pamler via lazarus wrote: You could create a meta package and install that. Excuse my ignorance. , But what is a "meta package"? A package which only contains requirements of other packages? -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] It is a beautiful day...
Great news! There is one more thing which would be helpful, at least for me. I am maintaining the Lazarus port of JVCL, and this library currently consists of 16 runtime and designtime packages (i.e. 32 lpk files), and when porting proceeds there will be more to follow. As you an imagine, it is a pain to install them manually... I already set up a project group which can compile all the packages, but what is missing is a way to install them. I mean: Could there be a button "Install"? After clicking on this button a routine should iterate through all the items of the project group, find the design time packages, mark them for installation, and finally rebuild the IDE. Can this be done? Werner -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Can't build Lazarus trunk because of error in fppkghelper.pas
Am 15.07.2019 um 01:41 schrieb Simon Ameis via lazarus: Hello all, I'm trying to compile Lazarus trunk revision 61589 with FPC trunk revision 40356. When building the IDE, I get this error: Your FPC trunk is rather old. When I update my FPC to r42449 and Lazarus to r61591 compilation of both completes without issues. -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
[Lazarus] Critical discussion about Lazarus foundation
Once more, there is a critical discussion about the Lazarus foundation in the forum (https://forum.lazarus.freepascal.org/index.php/topic,45905.msg325308). I think there should be a competent answer by the leading people. Wener -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] How to switch a project from 32 to 64 bit (on Windows 7 x64)?
Am 28.05.2019 um 10:40 schrieb Bo Berglund via lazarus: Right now I have the following installed in my Win7 x64 environment: Lazarus 1.6 Lazarus 1.8 Lazarus 1.8.4 32 bit Lazarus 2.0.0 32 bit Lazarus 2.0.0 64 bit All of these have internbal fpc directories containing the correspondiing fpc compiler files. The same with me (plus some more, in particular trunk installations for Lazarus and fpc). This is indispensable for testing when your code should not be tied to the newest IDE version. Normally, it is no problem to switch between different versions. But be aware: When loading an project in a new version may change the project in a way that it is not readable by the old version again. Laz 2.0, for example, can add the line "Application.Scaled" to the project unit when you use the High-dpi features - this is a problem for 1.6. (You may enclose the line by an $IFDEF which helps for some time, but after some changes the IDE is very persistent and adds the line again). Or Lazarus trunk introduces a new file structure, you must save every new project with checed "Maximize compatibility of project files" in "Project options" > "Miscellaneous"; otherwise the project will have no files in Laz 2.0.2 or older. -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] is there a free Grid component better than the default TStringGrid?
Am 27.05.2019 um 06:43 schrieb Dennis via lazarus: I am hoping one that supports different column types editing without much coding on my side. That's what the standard TStringGrid can do. Just use Columns. You can pick an editor in the ButtonStyle property. In case of the picklist editor specify the combobox items in property PickList; in case of the checkbox column specify the value assigned to the checked and unchecked state in properties ValueChecked and ValueUnChecked. Of course, these editor types require the grid to be in edit mode (i.e. goEditing in Options). -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
[Lazarus] Displaying additional chm help files in the IDE for other packages
Motivated by Don Siders' updates to lcl xml help files I began to add to the help files for TAChart, too. The new hints do show up in the code editor, and now I am able also to build the chm file from the xml files using fpdoc. But I cannot convince the IDE to display the help files when F1 (or Ctrl+F1 in classic keyboard mode) is pressed. I thought I'd have to register the new help file somehow in "Tools" > "Options" > "Help Options" > "Databases", but there's nothing to add a new package. Any help would be appreciated. -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Website/Mantis back online
Am 23.04.2019 um 22:31 schrieb Bart via lazarus: On Tue, Apr 23, 2019 at 11:44 AM Werner Pamler via lazarus wrote: BTW, are regular users (i.e. without developer status) able to edit their own text after uploading? As I remember from my non-developer days this was not possible. Yes, they are. I'm just reporter in fpc, but I can edit (and delete) my notes. Seemingly not everybody: https://forum.lazarus.freepascal.org/index.php/topic,45168.msg318748 -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] css Re: Website/Mantis back online
Am 23.04.2019 um 12:42 schrieb Michael Van Canneyt via lazarus: On Tue, 23 Apr 2019, Martin Frb via lazarus wrote: On 23/04/2019 11:41, Werner Pamler via lazarus wrote: I am slowly getting used to it. Writing notes to some bug reports I noticed an annoying issue, though: While typing the text does not wrap any more when it becomes wider than the memo (after pressing "Add Note" the text is wrapped however). I considers this important to facilitate proof-reading the text before submission. BTW, are regular users (i.e. without developer status) able to edit their own text after uploading? As I remember from my non-developer days this was not possible. Therefore, it is even more important that the text is wrapped before sending. Otherwise we will be plagued with more and more unreadable submissions. this may help, if added textarea { white-space: pre-wrap; } Added, please test. Michael. Yes, it works. Thank you, Martin and Michael -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Website/Mantis back online
I am slowly getting used to it. Writing notes to some bug reports I noticed an annoying issue, though: While typing the text does not wrap any more when it becomes wider than the memo (after pressing "Add Note" the text is wrapped however). I considers this important to facilitate proof-reading the text before submission. BTW, are regular users (i.e. without developer status) able to edit their own text after uploading? As I remember from my non-developer days this was not possible. Therefore, it is even more important that the text is wrapped before sending. Otherwise we will be plagued with more and more unreadable submissions. Werner -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Website/Mantis back online // activity columns
Am 21.04.2019 um 01:40 schrieb Martin Frb via lazarus: On 21/04/2019 01:34, Werner Pamler via lazarus wrote: When I open a report and scroll down to the "Activities" the width of the text column is much too narrow, hardly usable, while the width of the author/date/info column is much too wide. It looks to me as if these two column widths are interchanged. And why the the note text in the "Activities" in bold? Which issue did you open. I tried https://bugs.freepascal.org/view.php?id=35339 in firefox, chrome, edge. All ok (in respect to column width) Chrome and Edge ok, Firefox has the issue. I deactivated all my extensions one by one and found that the issue is due to VTZilla. Strangely enough the error remains gone when I activate VTZilla again. -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Website/Mantis back online
When I open a report and scroll down to the "Activities" the width of the text column is much too narrow, hardly usable, while the width of the author/date/info column is much too wide. It looks to me as if these two column widths are interchanged. And why the the note text in the "Activities" in bold? -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Event with changed signature can be loaded without error
Am 12.04.2019 um 20:23 schrieb Ondrej Pokorny via lazarus: On 12.04.2019 19:35, Werner Pamler via lazarus wrote: I don't know: is this changed or am I fooled by my memory? I was rather sure that when the signature of a published event is changed, forms saved with the old signature cannot be read without error. But now I notice that this is not true any more. AFAIR it has always been so. Didn't you mix up with virtual methods? I mixed up loading and and toggling between form and code view, and my memory refers to Delphi. I just tested it again: After loading a D7 project with a VirtualTreeView into Delphi XE2 and pressing F12 to toggle to Form view I get the error "Method ... to which VirtualStringTree1.OnGetText refers has an incompatible parameter list" because the D7 event signature contains a widestring parameter, but the XE2 event contains a normal string parameter. - When i load the toolsdemo mentioned in the first message into Lazarus and press F12 nothing happens although the parameter list is different. Strange. You must never change the signature of published events. You pick up a new name, deprecate the old one and after a stable release you delete the deprecated one. In this way you still break compatibility, but in a way that the user is notified about it. I hope you will have more understanding for breaking changes in the future after this experience :) Don't worry, it will be changed shorty, but I wanted to have an example which every interested reader could test easily without having to install anything. -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
[Lazarus] Event with changed signature can be loaded without error
I don't know: is this changed or am I fooled by my memory? I was rather sure that when the signature of a published event is changed, forms saved with the old signature cannot be read without error. But now I notice that this is not true any more. The version of TAChart which I just committed to trunk had to change the signature of the TChartDataPointDrawEvent event from procedure (ASender: TDataPointDrawTool) of object; to procedure (ASender: TDataPointDrawTool; ADrawer: IChartDrawer) of object; Testing this with the demo in folder (lazarus)/components/tachart/demo/tools in which the event is handled I was expecting an error - but no, the program compiles and runs fine as if nothing had changed. Am I missing something? -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] fpexif leak
Am 09.04.2019 um 11:12 schrieb Michael Thompson via lazarus: G'day, I posted a patch for fpexif a little while back. Not sure who maintains fpexif, but could they review and hopefully apply? I forgot to add 'patch' to the name of the ticket I raised. I'm convinced it's a typo in the code... An object is being created but only freed if an exception is raised, suspect the "except" should be "finally". I've been running with the patched code for a while now with no issue. https://bugs.freepascal.org/view.php?id=34537 Oh, sorry, I did not see this one. It should be fixed now. -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] New XML format for project info files
Am 18.03.2019 um 06:54 schrieb Juha Manninen via lazarus: On Mon, Mar 18, 2019 at 1:12 AM Werner Pamler via lazarus wrote: I saw that you activated legacy compatibility mode by default, thank you. But now the checkbox in the project options is out of sync. Shouldn't it be checked now by default, too? Here it is checked now by default both in existing and in new projects. Juha Unfortunately this does not solve the issue for me personally. I post a lot of code in the forum, and since I normally work with Laz-trunk and, of course, forget to activate the compatibility option the code will be useless for users of legacy versions. I really would appreciate to have the previous solution (a global default setting for the compatibility option) in addition to the current solution. Of course this new option should now be off by default, but after once having switched it on all my demo projects would be readable also by legacy Lazarus. I reopened bug report https://bugs.freepascal.org/view.php?id=22752 for this request. From the perspective of a legacy Laz user a stand-alone tool to convert the new format back to legacy would be helpful, too. Currently, a user not having Laz trunk is unable to open any projects saved by Laz trunk without editing the xml files manually! Most users still are not aware of this change - see discussion following https://forum.lazarus.freepascal.org/index.php/topic,44161.msg316081.html#msg316081. I think this is an important point to be listed inhttp://wiki.freepascal.org/Lazarus_2.2.0_release_notes. Werner -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Setting a groupbox caption bold?
You did not say that you want to have bold caption for several controls. In order to "bold" all controls on a form, I use another procedure which is called from the OnCreate event of a form and recursively iterates through all controls and their children, seeks for TCustomGroupBox controls and calls "BoldGroup" for them. Just look at the attachment to see how it works; the demo contains a hierarchy of various levels of groupbox containers. <> -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Setting a groupbox caption bold?
Am 01.04.2019 um 00:09 schrieb Bo Berglund via lazarus: I have a configuration setting form where I have used group boxes to collect properties that belong together. But the groupbox border is not really well defined so I would like to be able to augment the form visually by setting the caption of the group boxes to bold. But I find no such property for the group box... Is there a way or am I out of luck? I use this code for TGroupbox, TRadiogroup and TCheckGroup: procedure BoldGroup(AControl: TWinControl); var i: Integer; propinfo: PPropInfo; cntrl: TControl; fnt: TFont; begin for i:=0 to AControl.ControlCount-1 do begin cntrl := AControl.Controls[i]; propinfo := GetPropInfo(cntrl, 'ParentFont'); if propinfo <> nil then SetOrdProp(cntrl, propinfo, Longint(false)); propinfo := GetPropInfo(cntrl, 'Font'); if propinfo <> nil then begin fnt := TFont(GetObjectProp(cntrl, 'Font')); fnt.Style := []; SetObjectProp(cntrl, 'Font', fnt); end; end; AControl.Font.Style := [fsBold]; -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] New XML format for project info files - disabled by default
Am 24.03.2019 um 10:51 schrieb Ondrej Pokorny via lazarus: Hello Juha & Werner, I see you disabled the new item format for project info files by default on Werner's request. I understand that the first version wasn't ideal - if you needed to open a project in 2.1 and 2.0/1.8 you always had to check the compatibility mode when opened in 2.1. But the current version is not ideal either - most people do not open projects in legacy versions and they have to disable compatibility mode for every new project manually. I came up with a reasonable solution: 1.) set CompatibilityMode automatically for legacy projects. 2.) disable CompatibilityMode for new projects. That should be good for everybody - the CompatibilityMode flag doesn't get lost if you open a project in a legacy Lazarus version and new projects use the new format. See https://bugs.freepascal.org/view.php?id=35262 Best Ondrej Yes, sounds reasonable. -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] New XML format for project info files
Am 18.03.2019 um 06:54 schrieb Juha Manninen via lazarus: On Mon, Mar 18, 2019 at 1:12 AM Werner Pamler via lazarus wrote: I saw that you activated legacy compatibility mode by default, thank you. But now the checkbox in the project options is out of sync. Shouldn't it be checked now by default, too? Here it is checked now by default both in existing and in new projects. Juha Always the same stupid error: Did not rebuild the IDE after updating from svn. -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] New XML format for project info files
Am 17.03.2019 um 18:18 schrieb Werner Pamler via lazarus: Am 17.03.2019 um 13:52 schrieb Juha Manninen via lazarus: I guess I must change the default value of project compatibility option to ON after all... Yes that should be helpful I saw that you activated legacy compatibility mode by default, thank you. But now the checkbox in the project options is out of sync. Shouldn't it be checked now by default, too? -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] New XML format for project info files
Am 17.03.2019 um 13:52 schrieb Juha Manninen via lazarus: I guess I must change the default value of project compatibility option to ON after all... Yes that should be helpful. BTW, there are other nodes also in the lpi files which still are counted: * RequiredPackages * Debugging/Exceptions * RunParams/Modes -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] New XML format for project info files
Am 17.03.2019 um 12:29 schrieb Juha Manninen via lazarus: What is the problem? Suppose I fix a bug in a demo program which comes with Lazarus, it clearly is a bug and there is no reason why it should not be backported to Fixes. I usually work with trunk, and now I must think of checking the compatibility box. I certainly will forget this, and the demo program will be broken in the Fixes branch. Not to mention all the third party programs out there which now are so nicely available by means of OPM. How will you force every developer to work in compatibility mode? And they have to change it with every demo project. It would be a bit better if there were a global option of setting the default for the compatibility box. And I see more trouble: package lpk files still use the old format of numbered nodes. When you once decide to introduce the new format also for packages also the packages will be broken - so far it's "only" the demos. Sorry, this is a mess. -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] New XML format for project info files
Am 15.03.2019 um 17:39 schrieb Juha Manninen via lazarus: Yes, there is option : Maximize compatibility of project files (LPI and LPS) in Project Options -> Miscellaneous. I did not test the option much myself. I guess it will get tested now by you and many others. It is a typical use case after all. I think we have a big mess now. This option must be ON at least until the release of the next version. The way it is now the current release version cannot read any project modified by trunk. And what happens when the next release appears? We will have the same situation. This way the new format can never be introduced without breaking the current release version unless the information is written in some kind of duplicate way: The old version always reads the old nodes if new nodes are not available, or the new nodes otherwise, the new version writes both old and new nodes when the compatibility option is ON. Later, a few versions in the future, when all old nodes have been replaced by new nodes we can switch the default of compatibility option to OFF. -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Universal FontDialog for LCL
Am 07.03.2019 um 14:12 schrieb AlexeyT via lazarus: Here's my GH repo with dialog which almost 100% mimics GTK2 FontDialog. https://github.com/alexey-t/atfontdialog On Windows the font dialog also allows to select the color which is missing here. An issue: the dialog is resizable, but the height jumps back to its original value when I click into one of the listboxes. -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] IDE unstable - Online Package manager bug
Am 24.02.2019 um 12:00 schrieb Michael Van Canneyt via lazarus: I find that the IDE has become very unstable lately. I didn't install any new packages, didn't update FPC (still on FPC 3.0.4). Just updated lazarus from SVN. 4 out of 5 attempts to close the IDE using the window manager button fails: lazarus hangs and I must kill it using killall -KILL lazarus from a terminal. It's very reproducible. Start lazarus Open package Compile package Switch to form editor of start project Close (window manager or menu file - exit) -> hang Just to confirm: I can observe the same on Windows and have to kill the IDE with the task manager. Sometimes the IDE does not close any more even after compiling a simple project. After uninstalling OPM the issue is gone. -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] How to configure Fppkg in IDE startup dialog with FPC 3.2 ?
Am 16.02.2019 um 20:03 schrieb AlexeyT via lazarus: -I deleted FPC 3.0.4 from Linux x64 OS path (/usr/.) -Instead installed FPC fixes3.2 via FpcUpDeluxe into ~/fpcupdeluxe/fpc IDE after recompiling via FPC 3.2 now asks FPPKG path!! in startup dialog. I cannot solve it. I tried all paths from ~/fpcupdeluxe dir and tried to press [Create new fppkg cfg] (sometimes this btn is enabled but gives no result- "fppkg config is corrupt"). Dialog asks me every time. Yes, the same for me (Laz trunk / fpc trunk, Win10). The "Create new fppkg cfg" button always yields for me an error message "Problem with Fppkg configuration / Failed to create a new Fppkg configuration. You will have to fix the configuration manually or reinstall Free Pascal." Clicking on "Start IDE" afterwards, however, starts Lazarus without any issues. -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Lazarus with fpc 3.2 [was Re: [fpc-devel] Suspicion about TThread.Synchronize]
Am 13.02.2019 um 17:18 schrieb Luca Olivetti via lazarus: I added a note to the wiki that both lclextensions and virtualtreeview are now included with lazarus. Which article? I want to have a look and check whether it is correct. Because the situation is more complicated: In Laz trunk (or v2.2 in the future) all VTV files were renamed to have a "laz." prefix, and the registered components were renamed as TLaz* (e.g. TLazVirtualStringTree instead of TVirtualStringTree). This was made to avoid a naming conflict if a user wants to install older oder newer versions of VTV from git or somewhere else. -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Lazarus with fpc 3.2 [was Re: [fpc-devel] Suspicion about TThread.Synchronize]
Am 13.02.2019 um 12:08 schrieb Luca Olivetti via lazarus: El 13/2/19 a les 9:50, Werner Pamler via lazarus ha escrit: I checked out r60392 but I still cannot compile VirtualTreeView (checked out from github https://github.com/blikblum/VirtualTreeView-Lazarus.git, branch lazarus-master) VirtualTrees.pas(772,19) Error: No matching implementation for interface method "SetData(const tagFORMATETC;var TagSTGMEDIUM;LongBool):LongInt; StdCall;" found Bye No, you must use the VirtualTreeViews which comes with Lazarus (folder components/virtualtreeview). If you absolutely want to stay with this github version you should replace "var" in the offending methods by a "const". I do not know, however, whether this version will cooperate with the Online-Package-Manager (you absolutely must uninstall the VTV of the Lazarus version!). If that would not work you'd be forced to use the VTV of the Lazarus installation, or you switch to Lazarus trunk in which this version conflict is resolved. -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Lazarus with fpc 3.2 [was Re: [fpc-devel] Suspicion about TThread.Synchronize]
Please update your Laz-fixes installation: The patch for the issue with VirtualTreeView has been merged to fixes in r60091, that for the issue with TAChart in r60392. -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Lazarus 2 RC3 Bug or my fault?
Am 04.02.2019 um 23:28 schrieb Joe via lazarus: I have a TListBox called LogBox in a test project and write strings with LogBox.Items.Add(stringvar) to LogBox. But the lines don't follow each other without space. There is space with approximately a half line hight between them. In Delphi, the lines in TListBox follow each other without this space. Is this a Lazarus bug or did I miss something? Did you set "Style" to "lbOwnerdrawFixed" and "ItemHeight" to a nonzero value? In this case the line height is given by "ItemHeight". Default "Style" is "lbStandard" where "ItemHeight" is forced to 0 which means that the line height is calculated from the font size. -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Unexpected TAChart's axis scaling
Am 06.01.2019 um 19:17 schrieb Valdas Jankūnas via lazarus: I attached in my first mail. Sorry. When I scrolled down I only saw the screenshots. Yes, this looks strange, and it could be a bug - I'll have to investigate. In the meantime you can work around by releasing the Range lock of the axis of the series that you want to deactivate: procedure TForm1.CheckBox1Change(Sender: TObject); begin Chart1LineSeries1.Active := Checkbox1.Checked; Chart1.AxisList[Chart1LineSeries1.AxisIndexY].Range.UseMin := Checkbox1.Checked; Chart1.AxisList[Chart1LineSeries1.AxisIndexY].Range.UseMax := Checkbox1.Checked; end; -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Unexpected TAChart's axis scaling
Am 06.01.2019 um 18:00 schrieb Valdas Jankūnas via lazarus: Hello, in Test Project I have a Chart with several LineSeries and one AreaSeries. AutoScaleAxisTransform in each Axis is used. I noticed some unexplainable behavior: - in fig_A you can see Chart in "all is OK" state, - if I do Chart1LineSeries1.Active:=FALSE (this series is tied to Axis #0) then all Axes suddenly expands (see attached fig_B), - if I do Chart.Axis#0.Range.UseMin/Max:=FALSE then all Axes scales to expected range (see attached fig_C). Attached Test Project. Is this a Bug? This is hard to tell from the description alone, there are so many possibilities... You should create a litte project which shows the issue and attach it (please include only source files, .pas, .lfm, .lpi, .lpi, no .exe, .ppu). -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus