From juha.manninen62 at gmail.com Mon Nov 1 00:57:45 2021 From: juha.manninen62 at gmail.com (Juha Manninen) Date: Mon, 1 Nov 2021 01:57:45 +0200 Subject: [Lazarus] =?utf-8?q?Attn_Jos=C3=A9=3A_TWindowsMask_oddity=3F?= In-Reply-To: References: Message-ID: On Sun, Oct 31, 2021 at 6:16 PM Bart via lazarus < lazarus at lists.lazarus-ide.org> wrote: > Why did you disable ranges and sets in the Windows implementation? > AFAIK it simulates the DOS/Windows command line behavior. José can answer more accurately. Juha -------------- next part -------------- An HTML attachment was scrubbed... URL: From joshyfun at gmail.com Mon Nov 1 12:21:16 2021 From: joshyfun at gmail.com (=?UTF-8?Q?Jos=c3=a9_Mejuto?=) Date: Mon, 1 Nov 2021 12:21:16 +0100 Subject: [Lazarus] =?utf-8?q?Attn_Jos=C3=A9=3A_TWindowsMask_oddity=3F?= In-Reply-To: References: Message-ID: <805d123d-4d04-e09c-b635-66fea01ef57b@gmail.com> El 31/10/2021 a las 17:12, Bart via lazarus escribió: > Hi José, > > In TWindowsMask.Compile (as in your TMaskUTF8Windows class) you do a > call to EscapeSpecialChars on the modified mask. > This will escape a.o. any '[' and ']' character, so ranges and sets > are not possible to use in the mask anymore. > Why did you disable ranges and sets in the Windows implementation? Hello, The target in *Windows classes is to mimic the old fashion CMD masks, and CMD masks does not have ranges or sets. When I implemented that fnuction the code does not allow disabling features, so now that code can be changed to disable ranges, sets and escape char instead escaping the chars. > And another question: why do you call Compile in the constructor for > TWindowsMask (TMaskUTF8Windows in your original)? LCL's TMask raises syntax errors (or others, I can not recall) at creation time and in my code the syntax check is at Compile time so I call compile to raise an exception if needed. There is no performance loss as Compile should not be called again unless the mask is changed via the property. -- From bartjunk64 at gmail.com Mon Nov 1 15:31:04 2021 From: bartjunk64 at gmail.com (Bart) Date: Mon, 1 Nov 2021 15:31:04 +0100 Subject: [Lazarus] =?utf-8?q?Attn_Jos=C3=A9=3A_TWindowsMask_oddity=3F?= In-Reply-To: <805d123d-4d04-e09c-b635-66fea01ef57b@gmail.com> References: <805d123d-4d04-e09c-b635-66fea01ef57b@gmail.com> Message-ID: On Mon, Nov 1, 2021 at 12:22 PM José Mejuto via lazarus wrote: > The target in *Windows classes is to mimic the old fashion CMD masks, > and CMD masks does not have ranges or sets. OK, this is by design. Since that is however not backwards compatible (the old mask implementation supported sets out of the box by default on all platforms, I changed "our" implementation. A note: IIRC (do not have the source at hand here) you escape [ ] and \, with or withoud mocEscapeChar enabled. if mocEscapeChar is not enabled, escaping these in the mask is probably not what you want. > LCL's TMask raises syntax errors (or others, I can not recall) at > creation time and in my code the syntax check is at Compile time so I > call compile to raise an exception if needed. Yes, the old mask did so, whci, to be hones, is a PITA. Normally you do SomeVar := TSomeClass.Create(...); try SomeVar.SomeThing; finally SomeVar.Free end; If you know you can let the constructor fail, just by giving it an "invalid" parameter, you hve to rewrite you code to: SomeVar := TSomeClass.Create(...); if Assigned(SomeVar) then begin try SomeVar.SomeThing; finally SomeVar.Free end; end; So, I changed it (and documented it as a change that breaks backwards compatibility). > Compile should not be called again unless the mask is changed > via the property. I think, that does not happen. The Mask property IIRC does not have a setter. I introduced a setter for the mask property, it sets fMaskIsCompiled to False Also, if compile fails and the user/prgrammer is stupid enough to call Matches again, Matches will simply return False (no exception), whic (even if the programmer is stupid) is a bad thing IMO. I fixed that by setting fMaskIsCompiled to False as first line in Compile and only set it to True if Compile does not raise an exception (so it finishes). Something else. When you reset the mask, you should also reset the internal representation of the mask and it's associated length value, otherwise you get an access violation when you set mask via the property and then call Matches. Again, thanks for helping me out. -- Bart From joshyfun at gmail.com Mon Nov 1 19:29:15 2021 From: joshyfun at gmail.com (=?UTF-8?Q?Jos=c3=a9_Mejuto?=) Date: Mon, 1 Nov 2021 19:29:15 +0100 Subject: [Lazarus] =?utf-8?q?Attn_Jos=C3=A9=3A_TWindowsMask_oddity=3F?= In-Reply-To: References: <805d123d-4d04-e09c-b635-66fea01ef57b@gmail.com> Message-ID: <52e907ab-6add-7bef-efa9-f9ee8e5acc18@gmail.com> El 01/11/2021 a las 15:31, Bart via lazarus escribió: >> The target in *Windows classes is to mimic the old fashion CMD masks, >> and CMD masks does not have ranges or sets. > OK, this is by design. > Since that is however not backwards compatible (the old mask > implementation supported sets out of the box by default on all > platforms, I changed "our" implementation. > > A note: IIRC (do not have the source at hand here) you escape [ ] and > \, with or withoud mocEscapeChar enabled. > if mocEscapeChar is not enabled, escaping these in the mask is > probably not what you want. Hello, The MaskWindows is to mimic Windows behaviour, it's an implementation using the complete TMask as engine, so this class controls everything and the user (programmer) only provides a mask, can not select, or should not be able to select, which features are available in the engine. If my class works in a different way its my mistake. In the other hand I recall why the escape is necessary instead disabling features, to mimic the "file?.dat" which must be transformed to my TMask "file[?].dat", if I left the "AnyCharOrNone" enable and disable sets and ranges this mask will not be interpreted correctly "fil[?.dat" so escaping in that function is a must. >> LCL's TMask raises syntax errors (or others, I can not recall) at >> creation time and in my code the syntax check is at Compile time so I >> call compile to raise an exception if needed. > [...] > So, I changed it (and documented it as a change that breaks backwards > compatibility). That's a design decision, I choose the other one based in the reason exposed. >> Compile should not be called again unless the mask is changed >> via the property. > I think, that does not happen. > The Mask property IIRC does not have a setter. You are right, I forget that when pusblished the Mask property. > I introduced a setter for the mask property, it sets fMaskIsCompiled to False > > Also, if compile fails and the user/prgrammer is stupid enough to call > Matches again, Matches will simply return False (no exception), whic > (even if the programmer is stupid) is a bad thing IMO. > I fixed that by setting fMaskIsCompiled to False as first line in > Compile and only set it to True if Compile does not raise an exception > (so it finishes). Good solution, yes. > Something else. > When you reset the mask, you should also reset the internal > representation of the mask and it's associated length value, otherwise > you get an access violation when you set mask via the property and > then call Matches. Quite sure, yes, everything must be reseted. -- From bartjunk64 at gmail.com Mon Nov 1 23:02:34 2021 From: bartjunk64 at gmail.com (Bart) Date: Mon, 1 Nov 2021 23:02:34 +0100 Subject: [Lazarus] =?utf-8?q?Attn_Jos=C3=A9=3A_TWindowsMask_oddity=3F?= In-Reply-To: <52e907ab-6add-7bef-efa9-f9ee8e5acc18@gmail.com> References: <805d123d-4d04-e09c-b635-66fea01ef57b@gmail.com> <52e907ab-6add-7bef-efa9-f9ee8e5acc18@gmail.com> Message-ID: On Mon, Nov 1, 2021 at 7:30 PM José Mejuto via lazarus wrote: > > A note: IIRC (do not have the source at hand here) you escape [ ] and > > \, with or withoud mocEscapeChar enabled. > > if mocEscapeChar is not enabled, escaping these in the mask is > > probably not what you want. > ... > In the other hand I recall why the escape is necessary instead disabling > features, to mimic the "file?.dat" which must be transformed to my TMask > "file[?].dat", if I left the "AnyCharOrNone" enable and disable sets and > ranges this mask will not be interpreted correctly "fil[?.dat" so > escaping in that function is a must. Yes, I saw that you call inherited Create with TMaskOpCodesAllAllowed. So, it works as designed (ans as you expected it to work). > > So, I changed it (and documented it as a change that breaks backwards > > compatibility). > > That's a design decision, I choose the other one based in the reason > exposed. Yes, I agree. Of course this was not meant as criticism. Whil at it yesterday, I also implemented read/write access for properties mask, maskopcodes, quirks for all classes that use them. I think I also need to write a setter for AutoReverseRange property (you have it in a define, so it cannot be altered at runtime). And since I was makig all parameter in the constructor available as a r/w property, I alos should take care of CaseSensitive. -- Bart From bartjunk64 at gmail.com Mon Nov 1 23:15:09 2021 From: bartjunk64 at gmail.com (Bart) Date: Mon, 1 Nov 2021 23:15:09 +0100 Subject: [Lazarus] =?utf-8?q?Attn_Jos=C3=A9=3A_TWindowsMask_oddity=3F?= In-Reply-To: References: <805d123d-4d04-e09c-b635-66fea01ef57b@gmail.com> <52e907ab-6add-7bef-efa9-f9ee8e5acc18@gmail.com> Message-ID: On Mon, Nov 1, 2021 at 11:02 PM Bart wrote: > I think I also need to write a setter for AutoReverseRange property Indeed it did. @Jose: in the setter for EscapeChar you should also set cMaskIsCompiled to False. -- Bart From nc-gaertnma at netcologne.de Tue Nov 2 13:54:19 2021 From: nc-gaertnma at netcologne.de (Mattias Gaertner) Date: Tue, 2 Nov 2021 13:54:19 +0100 Subject: [Lazarus] Lazarus Release Candidate 2 of 2.2.0 Message-ID: <20211102135419.0c5573db@limapholos.matflo.wg> The Lazarus team is glad to announce the second release candidate of Lazarus 2.2. This release was built with FPC 3.2.2. Here is the list of changes for Lazarus and Free Pascal: http://wiki.lazarus.freepascal.org/Lazarus_2.2.0_release_notes http://wiki.lazarus.freepascal.org/User_Changes_3.2.2 Here is the list of fixes for Lazarus 2.2.x: https://gitlab.com/freepascal.org/lazarus/lazarus/-/commits/fixes_2_2 The release is available for download on SourceForge: http://sourceforge.net/projects/lazarus/files/ Choose your CPU, OS, distro and then the "Lazarus 2.2RC2" directory. Checksums for the SourceForge files: https://www.lazarus-ide.org/index.php?page=checksums#2_2_0RC2 Minimum requirements: Windows: 2k, XP, Vista, 7, 8, 8.1 and 10, 32 or 64bit. FreeBSD/Linux: gtk 2.8 for gtk2, qt4.5 for qt, qt5.6 for qt5, 32 or 64bit. Mac OS X: Cocoa (64bit) 10.12 to 11.4, Carbon (32bit) 10.5 to 10.14, qt and qt5 (32 or 64bit). The gitlab page: https://gitlab.com/freepascal.org/lazarus/lazarus/-/tree/lazarus_2_2_0_RC2 Last trunk svn revision was r65398. For people who are blocked by SF, the Lazarus releases from SourceForge are mirrored at:ftp://ftp.freepascal.org/pub/lazarus/releases/ == Why should everybody (including you) test the release candidate? == In the past weeks the Lazarus team has stabilized the 2.2 fixes branch. The resulting 2.2RC2 is now stable enough to be used by anyone for test purposes. However many of the fixes and new features that were committed since the release of 2.0 required changes to the code of existing features too. While we have tested those ourselves, there may still be problems that only occur with very specific configurations or one project in a million. Yes, it may be that you are the only person with a project, that will not work in the new IDE. So if you do not test, we cannot fix it. Please do not wait for the final release, in order to test. It may be too late. Once the release is out we will have to be more selective about which fixes can be merged for further 2.2.x releases. So it may be, that we cannot merge the fix you require. And then you will miss out on all the new features. == How to test == Download and install the 2.2 RC2. - On Windows you can install as a 2ndary install, that will not affect your current install: http://wiki.lazarus.freepascal.org/Multiple_Lazarus#Installation_of_multiple_Lazarus - On other platforms, if you install to a new location you need to use --primary-config-path In either case you should make backups. (including your primary config) Open your project in the current Lazarus (2.0.x), and use "Publish Project" from the project menu. This creates a clean copy of your project. You can then open that copy in the RC2. Please test: - If you can edit forms in the designer - rename components / change properties in Object inspector / Add new events - Add components to form / Move components on form - Frames, if you use them - If you can navigate the source code (e.g. jump to implementation) - Auto completion in source code - Compile, debug and run - Anything else you use in your daily work ------ Mattias From badsectoracula at gmail.com Tue Nov 2 16:51:27 2021 From: badsectoracula at gmail.com (Kostas Michalopoulos) Date: Tue, 2 Nov 2021 17:51:27 +0200 Subject: [Lazarus] Lazarus Release Candidate 2 of 2.2.0 In-Reply-To: <20211102135419.0c5573db@limapholos.matflo.wg> References: <20211102135419.0c5573db@limapholos.matflo.wg> Message-ID: <8df9a316-d1ff-8325-5806-6e467ee9ff8f@gmail.com> On 11/2/2021 2:54 PM, Mattias Gaertner via lazarus wrote: > The Lazarus team is glad to announce the second release candidate of > Lazarus 2.2. Neat. I did a bit of testing with some of my projects and everything that worked in the last stable version i had (2.0.6) seems to work fine with 2.2.0RC2. I also did some testing with the MDI functionality that was implemented in Win32 last year, which BTW... > Here is the list of changes for Lazarus and Free Pascal: > http://wiki.lazarus.freepascal.org/Lazarus_2.2.0_release_notes > http://wiki.lazarus.freepascal.org/User_Changes_3.2.2 ...isn't mentioned in the Lazarus changelog (the first non-trunk version to have it was 2.2.0RC1, at least from a quick look in the source code of 2.2.0RC1 and 2.0.12). The MDI stuff seem to work mostly fine, however there is an issue i noticed with paint and form resize events. I used this doodle app (perhaps i can modify it and have it part of Lazarus tests or something to test MDI support in other widgetsets?): http://runtimeterror.com/pages/badsector/nyan/gimme/mdidoodlesrc.zip This builds with Delphi 2 (which is the only Delphi i have access to and what i used as the behavioral basis for my Win32 MDI patch) and Lazarus (make sure to clean everything between builds). The difference is between Delphi 2, an older SVN-based build of Lazarus i have (Lazarus 2.1.0 r64351M FPC 3.3.1 x86_64-win64-win32/win64) and 2.2.0RC2: In Delphi 2 the program receives only a single resize event in the MDI child form for the final form size (notice how the both the main form and the MDI child form use the default size which lets windows place it as it wants) followed by a paint event. The app uses a bitmap to store the doodle which is setup during resize events and is drawn on the form itself during paint events. In r63451M the program receives two resize events, one for some initial (stored during design time, i think) size followed by the larger (due to my large monitor) form size that is shown when it is in MDI - both are fine as long as the final size event is correct, IMO, so no problem here. Then a paint event follows. In 2.2.0RC2 however the paint event comes between the initial and second resize events which means that the background bitmap is not set up properly. Now of course it'd be trivial to work around the change by adding an Invalidate call to the resize event, but IMO this is a regression. There should either be a second paint event or the paint event should be delayed until sizing is settled. This would be both consistent with how size and paint events seemed to work in previous version of Lazarus as well as Delphi and also consistent with how Windows (from where most of the VCL and LCL behavior comes from) behaves with WM_SIZE and WM_PAINT (WM_SIZE always comes before WM_PAINT and WM_PAINT is always sent if a window is enlarged to paint the new area). Beyond the above i couldn't find any other issues with 2.2.0RC2. Kostas From juha.manninen62 at gmail.com Tue Nov 2 20:20:45 2021 From: juha.manninen62 at gmail.com (Juha Manninen) Date: Tue, 2 Nov 2021 21:20:45 +0200 Subject: [Lazarus] Masks: the naming of ... In-Reply-To: References: <724557d6-16a5-6a47-0cec-9a07dd10a112@narod.ru> Message-ID: Bart, please run the TMask unit test project while you change the code. I fixed its compilation in 3c7586c0f8 but many tests fail. A unit test is especially useful with such text manipulation code. It is a good idea to run the tests after every change. Keep the test project open when changing. Regards, Juha -------------- next part -------------- An HTML attachment was scrubbed... URL: From bartjunk64 at gmail.com Tue Nov 2 21:43:55 2021 From: bartjunk64 at gmail.com (Bart) Date: Tue, 2 Nov 2021 21:43:55 +0100 Subject: [Lazarus] Masks: the naming of ... In-Reply-To: References: <724557d6-16a5-6a47-0cec-9a07dd10a112@narod.ru> Message-ID: On Tue, Nov 2, 2021 at 8:21 PM Juha Manninen via lazarus wrote: > Bart, please run the TMask unit test project while you change the code. How to run that exactly without having to run the entire test suite? -- Bart From bartjunk64 at gmail.com Tue Nov 2 22:59:14 2021 From: bartjunk64 at gmail.com (Bart) Date: Tue, 2 Nov 2021 22:59:14 +0100 Subject: [Lazarus] Masks: the naming of ... In-Reply-To: References: <724557d6-16a5-6a47-0cec-9a07dd10a112@narod.ru> Message-ID: On Tue, Nov 2, 2021 at 9:43 PM Bart wrote: > How to run that exactly without having to run the entire test suite? OK, looked at the wrong test folder... I fixed the filename 'a[b]c' not matching the mask 'a[b]c' in DisableRange. TestSpecial: to test this feature mocAnyCharOrNone must be set, which is excluded from DefaultMaskOpCodes. TestWindows: the tests for wqFilenameEnd I think only work if mocAnyCharOrNone is enabled: José commented that quirk with This presents a problem, since DefaultMaskOpCodes excludes mocAnyCharOrNone , but DefaultWindowsQuirks requires it. I see 2 solutions: 1. On TWindows* mocAnyCharOrNone will be enabled by default, while it is not on TMask* 2. Remove wqFilenameEnd from DefaultWindowsQuirks and describe that adding that quirk implies that mocAnyCharOrNone will be enabled. A cleaner solution would be to NOT have wqFilenameEnd depend on mocAnyCharOrNone , but I have no idea how to do that. -- Bart From ganmax at narod.ru Tue Nov 2 23:11:21 2021 From: ganmax at narod.ru (Maxim Ganetsky) Date: Wed, 3 Nov 2021 01:11:21 +0300 Subject: [Lazarus] Lazarus Release Candidate 2 of 2.2.0 In-Reply-To: <8df9a316-d1ff-8325-5806-6e467ee9ff8f@gmail.com> References: <20211102135419.0c5573db@limapholos.matflo.wg> <8df9a316-d1ff-8325-5806-6e467ee9ff8f@gmail.com> Message-ID: <0310680d-4afe-b161-7e2e-993edc07a2e8@narod.ru> 02.11.2021 18:51, Kostas Michalopoulos via lazarus пишет: > On 11/2/2021 2:54 PM, Mattias Gaertner via lazarus wrote: >> The Lazarus team is glad to announce the second release candidate of >> Lazarus 2.2. > > Neat. I did a bit of testing with some of my projects and everything > that worked in the last stable version i had (2.0.6) seems to work fine > with 2.2.0RC2. > > I also did some testing with the MDI functionality that was implemented > in Win32 last year, which BTW... > >> Here is the list of changes for Lazarus and Free Pascal: >> http://wiki.lazarus.freepascal.org/Lazarus_2.2.0_release_notes >> http://wiki.lazarus.freepascal.org/User_Changes_3.2.2 > > ...isn't mentioned in the Lazarus changelog (the first non-trunk version > to have it was 2.2.0RC1, at least from a quick look in the source code > of 2.2.0RC1 and 2.0.12). > > The MDI stuff seem to work mostly fine, however there is an issue i > noticed with paint and form resize events. I used this doodle app Please create a bug report. -- Best regards, Maxim Ganetsky mailto:ganmax at narod.ru From bartjunk64 at gmail.com Tue Nov 2 23:24:37 2021 From: bartjunk64 at gmail.com (Bart) Date: Tue, 2 Nov 2021 23:24:37 +0100 Subject: [Lazarus] Masks: the naming of ... In-Reply-To: References: <724557d6-16a5-6a47-0cec-9a07dd10a112@narod.ru> Message-ID: On Tue, Nov 2, 2021 at 8:21 PM Juha Manninen via lazarus wrote: > Bart, please run the TMask unit test project while you change the code. Whilst doing that I fiddled around with bot the tests and the masks unit. I then wanted to commit (push) these changes seperately. I got stuck. In svn I could commit a single file, then another. I git I don;t know how to do that. My workflow currently is: make changes git commit files I changed (solve one problem per commit) git pull (I have pull.rebase=true) git push I resorted to do a git restore on the changes to the test suite, then commiited and pushed the changes to masks unit. (And then I found out my changes to the testsuit were unnecessary, so that saved me from doing the changes all over again...) PS. The test suite runs fine again (but see my remarks on the wqFilenameEnd quirk. PS 2: building any program in the lazarus tree pollutes my tree and git gives warnings about untracked files: Here's what git tells me after building the test suite for masks unit: C:\devel\lazarus>git status On branch main Your branch is up to date with 'origin/main'. Untracked files: (use "git add ..." to include in what will be committed) components/lazutils/test/backup/ components/lazutils/test/testmasks.or nothing added to commit but untracked files present (use "git add" to track) Is there a way to suppress the warning about untracked files alltogether? Orr whould all this be added to our .gitignore file? -- Bart From bartjunk64 at gmail.com Tue Nov 2 23:43:19 2021 From: bartjunk64 at gmail.com (Bart) Date: Tue, 2 Nov 2021 23:43:19 +0100 Subject: [Lazarus] Masks: the naming of ... In-Reply-To: References: <724557d6-16a5-6a47-0cec-9a07dd10a112@narod.ru> Message-ID: On Tue, Nov 2, 2021 at 8:21 PM Juha Manninen via lazarus wrote: > I fixed its compilation in 3c7586c0f8 but many tests fail. Thank you for that (a bit late, but nevertheless). -- Bart From juha.manninen62 at gmail.com Wed Nov 3 00:46:35 2021 From: juha.manninen62 at gmail.com (Juha Manninen) Date: Wed, 3 Nov 2021 01:46:35 +0200 Subject: [Lazarus] Masks: the naming of ... In-Reply-To: References: <724557d6-16a5-6a47-0cec-9a07dd10a112@narod.ru> Message-ID: I am away from my development computer now. Short comments about the git issues: I use "git gui" for commits. It shows untracked files in a separate pane which does not bother much. IIRC there is a setting to not show them at all. You can make many commits and push them sometime later. Actually you can modify, join and reorder them before pushing which is handy. Regards Juha -------------- next part -------------- An HTML attachment was scrubbed... URL: From bartjunk64 at gmail.com Wed Nov 3 09:56:25 2021 From: bartjunk64 at gmail.com (Bart) Date: Wed, 3 Nov 2021 09:56:25 +0100 Subject: [Lazarus] Masks: the naming of ... In-Reply-To: References: <724557d6-16a5-6a47-0cec-9a07dd10a112@narod.ru> Message-ID: On Tue, Nov 2, 2021 at 10:59 PM Bart wrote: > I see 2 solutions: > 1. On TWindows* mocAnyCharOrNone will be enabled by default, while it > is not on TMask* > 2. Remove wqFilenameEnd from DefaultWindowsQuirks and describe that > adding that quirk implies that mocAnyCharOrNone will be enabled. > > A cleaner solution would be to NOT have wqFilenameEnd depend on > mocAnyCharOrNone , but I have no idea how to do that. A third solution: Include mocAnyCharOrNone in DefaultMaskOpCodes. It is very unlikely that this will cause regressions, since in the old implementation [?] would only match a literal '?'. Then, setting wqFilenameEnd in Quirks on TWindows* should implicitely acitvate mocAnyCharOrNone... -- Bart From wkitty42 at windstream.net Wed Nov 3 11:25:47 2021 From: wkitty42 at windstream.net (wkitty42 at windstream.net) Date: Wed, 3 Nov 2021 06:25:47 -0400 Subject: [Lazarus] Masks: the naming of ... In-Reply-To: References: <724557d6-16a5-6a47-0cec-9a07dd10a112@narod.ru> Message-ID: On 11/2/21 6:24 PM, Bart via lazarus wrote: > Untracked files: > (use "git add ..." to include in what will be committed) > components/lazutils/test/backup/ > components/lazutils/test/testmasks.or > > nothing added to commit but untracked files present (use "git add" to track) > > Is there a way to suppress the warning about untracked files alltogether? > Orr whould all this be added to our .gitignore file? yes, put them in your .gitignore if you don't want them tracked and you want no notifications about them changing... -- NOTE: No off-list assistance is given without prior approval. *Please keep mailing list traffic on the list where it belongs!* From badsectoracula at gmail.com Wed Nov 3 14:13:36 2021 From: badsectoracula at gmail.com (Kostas Michalopoulos) Date: Wed, 3 Nov 2021 15:13:36 +0200 Subject: [Lazarus] Lazarus Release Candidate 2 of 2.2.0 In-Reply-To: <0310680d-4afe-b161-7e2e-993edc07a2e8@narod.ru> References: <20211102135419.0c5573db@limapholos.matflo.wg> <8df9a316-d1ff-8325-5806-6e467ee9ff8f@gmail.com> <0310680d-4afe-b161-7e2e-993edc07a2e8@narod.ru> Message-ID: <25b06a30-5dcf-77cd-7ce9-3c434e2ffc4f@gmail.com> On 11/3/2021 12:11 AM, Maxim Ganetsky via lazarus wrote: > Please create a bug report. Sure, here it is: https://gitlab.com/freepascal.org/lazarus/lazarus/-/issues/39454 Kostas From luca at wetron.es Wed Nov 3 15:56:34 2021 From: luca at wetron.es (Luca Olivetti) Date: Wed, 3 Nov 2021 15:56:34 +0100 Subject: [Lazarus] Debugger stops in c dll even when no breakpoint set In-Reply-To: References: <86f2f785-f96a-0202-3e46-a0a4d0ba5c3e@mfriebe.de> <06426d35-a8fc-280f-5021-3f142f713f48@wetron.es> <955d65e9-a5ef-3359-c830-5621b7492b45@wetron.es> Message-ID: El 29/10/21 a les 12:48, Christo Crause ha escrit: > > On Fri, Oct 29, 2021 at 10:41 AM Luca Olivetti via lazarus > > > wrote: > > > I now tested under windows 10 64 bits (the exe is 32 bits, the previous > test was under windows 7 32 bits), and here instead of stopping once in > ntdll!RtlpNtMakeTemporaryKey it stops twice: in ntdll!RtlZeroHeap > and in > ntdll!RtlCaptureStackContext. > The former (RtlZeroHeap) shows what it seems a bogus call stack (i.e. > just two levels, the RtlZeroHeap itself and 00000000). > > > Searching around seems to suggest that RtlpNtMakeTemporaryKey is > typically part of a stack trace involving memory/stack corruption or > freeing an invalid reference or already freed pointer.  See this > example: > https://stackoverflow.com/questions/45162248/calling-free-in-c-triggers-ntdlldbgbreakpoint-in-debug-but-crashes-in-rel/45247035 > > > Since the code writes something to memory in the int3 branch, check > errno to see if that reveals something. OK, I added a printf("Error clear %d: %s\n", errno, strerror(errno)); after the call to free. When run outside the debugger, it prints "Error clear 0: no error", when run from lazarus "Error clear 22: Invalid argument". I then found this document https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/free?view=msvc-160 it says that "when the application is linked with a debug version of the C run-time libraries, free resolves to _free_dbg", but I don't think it does that dynamically based on how the app is been called (directly or through a debugger), or does it? In any case I checked the documentation for the "CRT Debug Heap" https://docs.microsoft.com/en-us/visualstudio/debugger/crt-debug-heap-details?view=vs-2019 and the bytes surrounding my allocated data aren't the same as explained in that article and they are the same before calling free as they were after calling malloc. Bye -- Luca Olivetti Wetron Automation Technology http://www.wetron.es/ Tel. +34 93 5883004 (Ext.3010) Fax +34 93 5883007 From bartjunk64 at gmail.com Wed Nov 3 18:44:44 2021 From: bartjunk64 at gmail.com (Bart) Date: Wed, 3 Nov 2021 18:44:44 +0100 Subject: [Lazarus] Masks: the naming of ... In-Reply-To: References: <724557d6-16a5-6a47-0cec-9a07dd10a112@narod.ru> Message-ID: On Tue, Nov 2, 2021 at 10:59 PM Bart wrote: > 2. Remove wqFilenameEnd from DefaultWindowsQuirks and describe that > adding that quirk implies that mocAnyCharOrNone will be enabled. Or a variant of this: remove it foem default and when added , aslo add mocAnyCharOrNone ... -- Bart From juha.manninen62 at gmail.com Wed Nov 3 19:29:44 2021 From: juha.manninen62 at gmail.com (Juha Manninen) Date: Wed, 3 Nov 2021 20:29:44 +0200 Subject: [Lazarus] Masks: the naming of ... In-Reply-To: References: <724557d6-16a5-6a47-0cec-9a07dd10a112@narod.ru> Message-ID: On Wed, Nov 3, 2021 at 12:27 AM Bart via lazarus < lazarus at lists.lazarus-ide.org> wrote: > Whilst doing that I fiddled around with bot the tests and the masks unit. > I then wanted to commit (push) these changes seperately. > I got stuck. > In svn I could commit a single file, then another. > I git I don;t know how to do that. > A resolution by file for commits in arbitrary and limiting. Often changes for one feature or bug fix must spread to many files, and often changes made in one file should be split into many commits. "git gui" allows to include/exclude hunks and even single lines in/from a commit. I believe your GUI tool supports the same thing. My workflow currently is: > > make changes > git commit files I changed (solve one problem per commit) > git pull (I have pull.rebase=true) > git push > Make many commits. Some of them may be experimental, no problem. Finally go through them, fix errors, join commits together, remove commits purely for debugging, and finally push. If a feature gets longer to finish, keep it in a local branch and rebase to main sometimes. PS. The test suite runs fine again (but see my remarks on the > wqFilenameEnd quirk. > Here it gives an error from procedure TestWindows. I don't see commits from you in the TestMasks project. Regards, Juha -------------- next part -------------- An HTML attachment was scrubbed... URL: From bartjunk64 at gmail.com Wed Nov 3 21:36:32 2021 From: bartjunk64 at gmail.com (Bart) Date: Wed, 3 Nov 2021 21:36:32 +0100 Subject: [Lazarus] Masks: the naming of ... In-Reply-To: References: <724557d6-16a5-6a47-0cec-9a07dd10a112@narod.ru> Message-ID: On Wed, Nov 3, 2021 at 7:30 PM Juha Manninen via lazarus wrote: > Here it gives an error from procedure TestWindows. Fixed now. (Adjusted some tests, since DefaultMaskOpCodes changed, fixed the wqFileNameEnd error.) > I don't see commits from you in the TestMasks project. Because as it turned out the changes I made to it were wrong, so I just reverted them. -- Bart From ganmax at narod.ru Wed Nov 3 23:22:16 2021 From: ganmax at narod.ru (Maxim Ganetsky) Date: Thu, 4 Nov 2021 01:22:16 +0300 Subject: [Lazarus] Masks: the naming of ... In-Reply-To: References: <724557d6-16a5-6a47-0cec-9a07dd10a112@narod.ru> Message-ID: <11136d64-ac75-eb0b-94de-7dd6a1b79b29@narod.ru> 03.11.2021 1:24, Bart via lazarus пишет: > Untracked files: > (use "git add ..." to include in what will be committed) > components/lazutils/test/backup/ > components/lazutils/test/testmasks.or I changed lazutils test projects to make their output to `units` subdirectory (it is already included in .gitignore) and also added `backup` subdirectories to .gitignore. Please test. -- Best regards, Maxim Ganetsky mailto:ganmax at narod.ru From juha.manninen62 at gmail.com Thu Nov 4 11:22:47 2021 From: juha.manninen62 at gmail.com (Juha Manninen) Date: Thu, 4 Nov 2021 12:22:47 +0200 Subject: [Lazarus] Lazarus Release Candidate 2 of 2.2.0 In-Reply-To: <20211102135419.0c5573db@limapholos.matflo.wg> References: <20211102135419.0c5573db@limapholos.matflo.wg> Message-ID: On Tue, Nov 2, 2021 at 2:54 PM Mattias Gaertner via lazarus < lazarus at lists.lazarus-ide.org> wrote: > The Lazarus team is glad to announce the second release candidate of > Lazarus 2.2. > Mattias, this should be announced in the forum, too. There are many people who don't read the mailing list. Juha -------------- next part -------------- An HTML attachment was scrubbed... URL: From larrydalton71 at gmail.com Sat Nov 6 16:58:05 2021 From: larrydalton71 at gmail.com (Larry Dalton) Date: Sat, 6 Nov 2021 11:58:05 -0400 Subject: [Lazarus] TMainMenu missing header Message-ID: 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? Sent from my iPhone From larrydalton71 at gmail.com Sat Nov 6 17:02:01 2021 From: larrydalton71 at gmail.com (Larry Dalton) Date: Sat, 6 Nov 2021 12:02:01 -0400 Subject: [Lazarus] TMainMenu missing header In-Reply-To: References: Message-ID: <90587A66-5A38-4304-9FA2-F787604ABBB1@gmail.com> I forgot to add it’s on Windows 10z. Sent from my iPhone > On Nov 6, 2021, at 11:58, Larry Dalton wrote: > > 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? > > Sent from my iPhone From werner.pamler at freenet.de Sat Nov 6 18:11:34 2021 From: werner.pamler at freenet.de (Werner Pamler) Date: Sat, 6 Nov 2021 18:11:34 +0100 Subject: [Lazarus] TMainMenu missing header In-Reply-To: References: Message-ID: <759bac61-5cce-5949-6b33-beb813a144a6@freenet.de> 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? From leobronstain at gmail.com Sat Nov 6 18:33:18 2021 From: leobronstain at gmail.com (=?UTF-8?B?0JvQtdCyINCR0YDQvtC90YjRgtC10LnQvQ==?=) Date: Sat, 06 Nov 2021 20:33:18 +0300 Subject: [Lazarus] TMainMenu missing header In-Reply-To: <759bac61-5cce-5949-6b33-beb813a144a6@freenet.de> References: <759bac61-5cce-5949-6b33-beb813a144a6@freenet.de> Message-ID: <17cf64fcf30.27ef.bf752abec8ccb817190c8de93e854ab0@gmail.com> Maybe his case is described in this topic? https://forum.lazarus.freepascal.org/index.php/topic,56275.0.html Werner Pamler via lazarus 6 ноября 2021 г. 8:11:44 ПП написал: > 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 at lists.lazarus-ide.org > https://lists.lazarus-ide.org/listinfo/lazarus From sysrpl at gmail.com Tue Nov 9 19:32:57 2021 From: sysrpl at gmail.com (Anthony Walter) Date: Tue, 9 Nov 2021 13:32:57 -0500 Subject: [Lazarus] Asteroids in Pascal Message-ID: As one of several demos of my vector graphics library for Free Pascal, I've recreated an arcade game. I've included a copy of the entire game logic code. Check it out here: https://www.getlazarus.org/videos/physics/asteroids/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From michael at freepascal.org Tue Nov 9 23:49:18 2021 From: michael at freepascal.org (Michael Van Canneyt) Date: Tue, 9 Nov 2021 23:49:18 +0100 (CET) Subject: [Lazarus] Asteroids in Pascal In-Reply-To: References: Message-ID: On Tue, 9 Nov 2021, Anthony Walter via lazarus wrote: > As one of several demos of my vector graphics library for Free Pascal, I've > recreated an arcade game. > > I've included a copy of the entire game logic code. Check it out here: > > https://www.getlazarus.org/videos/physics/asteroids/ > Boy, does that bring back memories. One of my favourites in the arcade hall... Michael. From sysrpl at gmail.com Thu Nov 11 21:53:03 2021 From: sysrpl at gmail.com (Anthony Walter) Date: Thu, 11 Nov 2021 15:53:03 -0500 Subject: [Lazarus] Crayon physics written in Pascal Message-ID: In less than 500 lines of code, I created a crayon physics demo program using Free Pascal. Check it out at the link below. Source code is included at the bottom of the page. https://www.getlazarus.org/videos/physics/catapult/ I've tested it out and it runs well on Windows, Linux, Mac, and smoothly on Raspberry Pi (using the OpenGL ES2 backend). -------------- next part -------------- An HTML attachment was scrubbed... URL: From bartjunk64 at gmail.com Thu Nov 11 21:53:45 2021 From: bartjunk64 at gmail.com (Bart) Date: Thu, 11 Nov 2021 21:53:45 +0100 Subject: [Lazarus] Crayon physics written in Pascal In-Reply-To: References: Message-ID: On Thu, Nov 11, 2021 at 9:54 PM Anthony Walter via lazarus wrote: My eye just caught this typo: { TDrawPhsyics is a scne obviously you mean "scene". -- Bart From sysrpl at gmail.com Thu Nov 11 22:27:12 2021 From: sysrpl at gmail.com (Anthony Walter) Date: Thu, 11 Nov 2021 16:27:12 -0500 Subject: [Lazarus] Crayon physics written in Pascal In-Reply-To: References: Message-ID: Thank you. Corrected. -------------- next part -------------- An HTML attachment was scrubbed... URL: From noelduffy at xtra.co.nz Fri Nov 12 23:21:30 2021 From: noelduffy at xtra.co.nz (Noel Duffy) Date: Sat, 13 Nov 2021 11:21:30 +1300 Subject: [Lazarus] Lazarus Release Candidate 2 of 2.2.0 In-Reply-To: <20211102135419.0c5573db@limapholos.matflo.wg> References: <20211102135419.0c5573db@limapholos.matflo.wg> Message-ID: On 3/11/21 01:54, Mattias Gaertner via lazarus wrote: > The Lazarus team is glad to announce the second release candidate of > Lazarus 2.2. [...] > Checksums for the SourceForge files: > https://www.lazarus-ide.org/index.php?page=checksums#2_2_0RC2 The checksums page does not have any checksum for 2_2_0RC2. The last update on that page is for 2_2_0RC1. Are there any plans to publish PGP/GPG signatures of releases? Cheers, Noel. From juha.manninen62 at gmail.com Sat Nov 13 17:16:46 2021 From: juha.manninen62 at gmail.com (Juha Manninen) Date: Sat, 13 Nov 2021 18:16:46 +0200 Subject: [Lazarus] Drag/drop project and package filenames on the IDE Message-ID: Regarding issue : https://gitlab.com/freepascal.org/lazarus/lazarus/-/issues/39338 The issue is about passing project info .lpi files etc. through cmd line for a running Lazarus IDE instance. However the same code is used for drag/drop which makes it a bigger improvement than I thought initially. I would like to merge this to 2.2. Does anybody see potential problems? Please test. Regards, Juha -------------- next part -------------- An HTML attachment was scrubbed... URL: From bartjunk64 at gmail.com Sat Nov 13 22:42:28 2021 From: bartjunk64 at gmail.com (Bart) Date: Sat, 13 Nov 2021 22:42:28 +0100 Subject: [Lazarus] Drag/drop project and package filenames on the IDE In-Reply-To: References: Message-ID: On Sat, Nov 13, 2021 at 5:17 PM Juha Manninen via lazarus wrote: > I would like to merge this to 2.2. Does anybody see potential problems? Please test. Isn't the policy to not merge new features, but only bugfixes? -- Bart From juha.manninen62 at gmail.com Sat Nov 13 23:02:50 2021 From: juha.manninen62 at gmail.com (Juha Manninen) Date: Sun, 14 Nov 2021 00:02:50 +0200 Subject: [Lazarus] Drag/drop project and package filenames on the IDE In-Reply-To: References: Message-ID: On Sat, Nov 13, 2021 at 11:46 PM Bart via lazarus < lazarus at lists.lazarus-ide.org> wrote: > Isn't the policy to not merge new features, but only bugfixes? > Yes but this one is clearly a bugfix. A project and a file name passed as cmd line parameters behaved differently depending on Lazarus being already running or not. When it was not running, all worked as expected. When a running Lazarus instance got those parameters, unexpected things happened. It turned out the same faulty code was used for drag'n'drop. It also behaved in an unexpected way. I am quite happy with the result. My only worry is that the change could cause regressions. Thus I ask people to test it. Fortunately most changes were refactoring. The moved code already worked elsewhere for the same purpose. No problems have come up in my tests. I will mark it for merging in a few days. Regards, Juha -------------- next part -------------- An HTML attachment was scrubbed... URL: From bartjunk64 at gmail.com Sat Nov 13 23:50:17 2021 From: bartjunk64 at gmail.com (Bart) Date: Sat, 13 Nov 2021 23:50:17 +0100 Subject: [Lazarus] Drag/drop project and package filenames on the IDE In-Reply-To: References: Message-ID: On Sat, Nov 13, 2021 at 11:03 PM Juha Manninen via lazarus wrote: >> Isn't the policy to not merge new features, but only bugfixes? > Yes but this one is clearly a bugfix. Sorry, I misunderstood then. -- Bart From support at uvviewsoft.com Sun Nov 14 01:52:27 2021 From: support at uvviewsoft.com (Alexey Tor.) Date: Sun, 14 Nov 2021 03:52:27 +0300 Subject: [Lazarus] Drag/drop project and package filenames on the IDE In-Reply-To: References: Message-ID: This must be tested with the patch: --pcp= parameter, which is used in IDE shortcuts from fpcupdeluxe. What if different --pcp content is passed (1st instance has another --pcp). Alexey From sysrpl at gmail.com Sun Nov 14 13:07:47 2021 From: sysrpl at gmail.com (Anthony Walter) Date: Sun, 14 Nov 2021 07:07:47 -0500 Subject: [Lazarus] Rendering SVG Documents in realtime in less than 160 lines of code Message-ID: It took me about 24 hours to design and write an SVG parser and rendering system from scratch. You can check it out on this page: https://www.getlazarus.org/videos/physics/svg/ The source code for the rendering is only 156 lines of Pascal code, Most of the work is done by the parser. It even handles stylesheets inside SVG documents. -------------- next part -------------- An HTML attachment was scrubbed... URL: From m.e.sanliturk at gmail.com Sun Nov 14 13:49:21 2021 From: m.e.sanliturk at gmail.com (Mehmet Erol Sanliturk) Date: Sun, 14 Nov 2021 15:49:21 +0300 Subject: [Lazarus] Rendering SVG Documents in realtime in less than 160 lines of code In-Reply-To: References: Message-ID: On Sun, Nov 14, 2021 at 3:08 PM Anthony Walter via lazarus < lazarus at lists.lazarus-ide.org> wrote: > It took me about 24 hours to design and write an SVG parser and rendering > system from scratch. You can check it out on this page: > > https://www.getlazarus.org/videos/physics/svg/ > > The source code for the rendering is only 156 lines of Pascal code, Most > of the work is done by the parser. It even handles stylesheets inside SVG > documents. > -- > _______________________________________________ > lazarus mailing list > lazarus at lists.lazarus-ide.org > https://lists.lazarus-ide.org/listinfo/lazarus Without explicit license information , it is NOT possible to use such sources with respect to Bern Convention about Copyrights because lack of such a license means the material ( in this case sources ) can NOT be used . At the right bottom of the above page , there is a "Legal" link . In the linked page , given information is NOT a license , but showing only responsibilities and rights of the getlazarus.org personnel . Thank you very much for your work . At least it gives a clear understanding about how such a program can be written in Free Pascal . Mehmet Erol Sanliturk -------------- next part -------------- An HTML attachment was scrubbed... URL: From md at delfire.net Mon Nov 15 16:37:37 2021 From: md at delfire.net (Marcos Douglas B. Santos) Date: Mon, 15 Nov 2021 12:37:37 -0300 Subject: [Lazarus] TextHint in TComboBox Message-ID: Hi, 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? best regards, Marcos Douglas -------------- next part -------------- An HTML attachment was scrubbed... URL: From md at delfire.net Mon Nov 15 16:51:21 2021 From: md at delfire.net (Marcos Douglas B. Santos) Date: Mon, 15 Nov 2021 12:51:21 -0300 Subject: [Lazarus] TextHint in TComboBox In-Reply-To: References: Message-ID: On Mon, Nov 15, 2021 at 12:37 PM Marcos Douglas B. Santos wrote: > > Hi, > 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? I've found this https://gitlab.com/freepascal.org/lazarus/lazarus/-/issues/30682 Marcos Douglas From werner.pamler at freenet.de Mon Nov 15 16:56:51 2021 From: werner.pamler at freenet.de (Werner Pamler) Date: Mon, 15 Nov 2021 16:56:51 +0100 Subject: [Lazarus] TextHint in TComboBox In-Reply-To: References: Message-ID: <8a77ef25-ad54-fcda-2a01-9747fbe6eddc@freenet.de> 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+. From md at delfire.net Mon Nov 15 17:04:00 2021 From: md at delfire.net (Marcos Douglas B. Santos) Date: Mon, 15 Nov 2021 13:04:00 -0300 Subject: [Lazarus] TextHint in TComboBox In-Reply-To: <8a77ef25-ad54-fcda-2a01-9747fbe6eddc@freenet.de> References: <8a77ef25-ad54-fcda-2a01-9747fbe6eddc@freenet.de> Message-ID: On Mon, Nov 15, 2021 at 12:56 PM Werner Pamler via lazarus wrote: > > 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+. Yes, after finding the bug issue that I posted in the last email, I tested using trunk... But I'm using 2.0.12. regards, Marcos Douglas From bartjunk64 at gmail.com Mon Nov 15 18:37:04 2021 From: bartjunk64 at gmail.com (Bart) Date: Mon, 15 Nov 2021 18:37:04 +0100 Subject: [Lazarus] TextHint in TComboBox In-Reply-To: References: <8a77ef25-ad54-fcda-2a01-9747fbe6eddc@freenet.de> Message-ID: On Mon, Nov 15, 2021 at 5:04 PM Marcos Douglas B. Santos via lazarus wrote: > Yes, after finding the bug issue that I posted in the last email, I > tested using trunk... > But I'm using 2.0.12. Well, either copy the relevant parts to your 2.0.12, use the 2.2RC or wait just a little bit more for the final release... -- Bart From md at delfire.net Mon Nov 15 19:11:59 2021 From: md at delfire.net (Marcos Douglas B. Santos) Date: Mon, 15 Nov 2021 15:11:59 -0300 Subject: [Lazarus] TextHint in TComboBox In-Reply-To: References: <8a77ef25-ad54-fcda-2a01-9747fbe6eddc@freenet.de> Message-ID: On Mon, Nov 15, 2021 at 2:40 PM Bart via lazarus wrote: > > On Mon, Nov 15, 2021 at 5:04 PM Marcos Douglas B. Santos via lazarus > wrote: > > > Yes, after finding the bug issue that I posted in the last email, I > > tested using trunk... > > But I'm using 2.0.12. > > Well, either copy the relevant parts to your 2.0.12, use the 2.2RC or > wait just a little bit more for the final release... Yes, I'll try to copy from 2.2RC. Thank you. Marcos Douglas From juha.manninen62 at gmail.com Mon Nov 15 20:49:51 2021 From: juha.manninen62 at gmail.com (Juha Manninen) Date: Mon, 15 Nov 2021 21:49:51 +0200 Subject: [Lazarus] TextHint in TComboBox In-Reply-To: References: <8a77ef25-ad54-fcda-2a01-9747fbe6eddc@freenet.de> Message-ID: On Mon, Nov 15, 2021 at 8:12 PM Marcos Douglas B. Santos via lazarus < lazarus at lists.lazarus-ide.org> wrote: > Yes, I'll try to copy from 2.2RC. Thank you. > Why can't you use 2.2RC directly? It is very close to the final 2.2. Do you experience a regression bug there? Juha -------------- next part -------------- An HTML attachment was scrubbed... URL: From md at delfire.net Tue Nov 16 10:25:18 2021 From: md at delfire.net (Marcos Douglas B. Santos) Date: Tue, 16 Nov 2021 06:25:18 -0300 Subject: [Lazarus] TextHint in TComboBox In-Reply-To: References: <8a77ef25-ad54-fcda-2a01-9747fbe6eddc@freenet.de> Message-ID: On Mon, Nov 15, 2021 at 4:50 PM Juha Manninen via lazarus wrote: > > On Mon, Nov 15, 2021 at 8:12 PM Marcos Douglas B. Santos via lazarus wrote: >> >> Yes, I'll try to copy from 2.2RC. Thank you. > > > Why can't you use 2.2RC directly? It is very close to the final 2.2. > Do you experience a regression bug there? I need to use the same version which all developers in the company are using. But we're testing 2.2RC to see if we can upgrade directly. Thanks. Marcos Douglas From jamal.gabra at gmail.com Tue Nov 16 12:27:29 2021 From: jamal.gabra at gmail.com (Jamal Gabra) Date: Tue, 16 Nov 2021 13:27:29 +0200 Subject: [Lazarus] Code generates an error after upgraded to FPC 3.2.2 Message-ID: Hello all, I just found out that something has changed from FPC 3.2.0 to FPC 3.2.2 that is starting to cause error in a simple app I developed to send emails through MS Outlook. I use Lazarus v2.2.0RC2 and FPC3.2.2. I use OLEVariant, and I believe the changes have taken place in the unit ComObj, but I could be wrong. PS:I do not own this code. Snippet code: uses comobj, variants; ... procedure TForm1.SendBtnClick(Sender: TObject); const olMailItem = 0; olByValue = 1; var MailItem: OLEVariant; podatak: OLEVariant; begin try Outlook := GetActiveOleObject('Outlook.Application'); except Outlook := CreateOleObject('Outlook.Application'); end; namespace := Outlook.GetNamespace('MAPI'); namespace.logon; MailItem := Outlook.CreateItem(olMailItem); podatak := 'test at test.com'; MailItem.Recipients.Add(podatak); MailItem.Recipients.ResolveAll; podatak := 'Subject'; MailItem.Subject := podatak; podatak := 'Body Msg'; MailItem.Body := podatak; MailItem.Display;//send Outlook := Unassigned; end; This code last worked fine while on FPC 3.2.0 but when upgraded it started erroring at the line: MailItem*.Subject* := podatak; Appreciate if someone can assist in pointing out something (the above code or the FPC code :) Not sure if this is the right place to report this but will start here. Thank you... Jamal -------------- next part -------------- An HTML attachment was scrubbed... URL: From juha.manninen62 at gmail.com Tue Nov 16 21:40:59 2021 From: juha.manninen62 at gmail.com (Juha Manninen) Date: Tue, 16 Nov 2021 22:40:59 +0200 Subject: [Lazarus] Drag/drop project and package filenames on the IDE In-Reply-To: References: Message-ID: On Sun, Nov 14, 2021 at 2:52 AM Alexey Tor. via lazarus < lazarus at lists.lazarus-ide.org> wrote: > This must be tested with the patch: --pcp= parameter, which is used in > IDE shortcuts from fpcupdeluxe. What if different --pcp content is > passed (1st instance has another --pcp). > My commit only changed the way the parameters are interpreted. *.lpi is interpreted as a project always, *.lpk as a package. It does not affect the logic of how a single instance / multiple instances are opened. Do you see a problem in how it behaves? Juha -------------- next part -------------- An HTML attachment was scrubbed... URL: From sysrpl at gmail.com Wed Nov 17 18:09:19 2021 From: sysrpl at gmail.com (Anthony Walter) Date: Wed, 17 Nov 2021 12:09:19 -0500 Subject: [Lazarus] SVG Rendering Performance using Free Pascal Message-ID: I was watching an older video from Nvidia regarding their path rendering extensions, a feature specific to their video card drivers. I've written a more open implementation and have run an initial quality and performance test. https://www.youtube.com/watch?v=fTm_s_pCBEM This is test was run on an i5 3470 CPU with a Radeon 550 on Mint Linux. Free Pascal 3.3 fixes branch with no optimizations. -------------- next part -------------- An HTML attachment was scrubbed... URL: From m.e.sanliturk at gmail.com Wed Nov 17 18:33:58 2021 From: m.e.sanliturk at gmail.com (Mehmet Erol Sanliturk) Date: Wed, 17 Nov 2021 20:33:58 +0300 Subject: [Lazarus] SVG Rendering Performance using Free Pascal In-Reply-To: References: Message-ID: It seems that I am the first person to watch the video . It 's playing very well . Very good . Mehmet Erol Sanliturk . On Wed, Nov 17, 2021 at 8:10 PM Anthony Walter via lazarus < lazarus at lists.lazarus-ide.org> wrote: > I was watching an older video from Nvidia regarding their path rendering > extensions, a feature specific to their video card drivers. I've written a > more open implementation and have run an initial quality and performance > test. > > https://www.youtube.com/watch?v=fTm_s_pCBEM > > This is test was run on an i5 3470 CPU with a Radeon 550 on Mint Linux. > Free Pascal 3.3 fixes branch with no optimizations. > -- > _______________________________________________ > lazarus mailing list > lazarus at lists.lazarus-ide.org > https://lists.lazarus-ide.org/listinfo/lazarus > -------------- next part -------------- An HTML attachment was scrubbed... URL: From cappellettogabriele at yahoo.it Thu Nov 18 10:08:52 2021 From: cappellettogabriele at yahoo.it (Gabriele Cappelletto) Date: Thu, 18 Nov 2021 10:08:52 +0100 Subject: [Lazarus] Component compilation problem with lazarus 2.2 In-Reply-To: <249c3f4a-ca5b-8ab6-0d6c-7aa8418a4942@talktalk.net> References: <12dc8636-832d-743b-faa9-934dd8515fb3.ref@yahoo.it> <12dc8636-832d-743b-faa9-934dd8515fb3@yahoo.it> <249c3f4a-ca5b-8ab6-0d6c-7aa8418a4942@talktalk.net> Message-ID: <9ff39ec5-28d6-7938-f75d-1399bb95725a@yahoo.it> An HTML attachment was scrubbed... URL: From cappellettogabriele at yahoo.it Thu Nov 18 10:59:32 2021 From: cappellettogabriele at yahoo.it (Gabriele Cappelletto) Date: Thu, 18 Nov 2021 10:59:32 +0100 Subject: [Lazarus] Component compilation problem with lazarus 2.2 In-Reply-To: <9ff39ec5-28d6-7938-f75d-1399bb95725a@yahoo.it> References: <12dc8636-832d-743b-faa9-934dd8515fb3.ref@yahoo.it> <12dc8636-832d-743b-faa9-934dd8515fb3@yahoo.it> <249c3f4a-ca5b-8ab6-0d6c-7aa8418a4942@talktalk.net> <9ff39ec5-28d6-7938-f75d-1399bb95725a@yahoo.it> Message-ID: An HTML attachment was scrubbed... URL: From bo.berglund at gmail.com Fri Nov 19 08:22:40 2021 From: bo.berglund at gmail.com (Bo Berglund) Date: Fri, 19 Nov 2021 08:22:40 +0100 Subject: [Lazarus] Component compilation problem with lazarus 2.2 References: <12dc8636-832d-743b-faa9-934dd8515fb3.ref@yahoo.it> <12dc8636-832d-743b-faa9-934dd8515fb3@yahoo.it> <249c3f4a-ca5b-8ab6-0d6c-7aa8418a4942@talktalk.net> <9ff39ec5-28d6-7938-f75d-1399bb95725a@yahoo.it> Message-ID: On Thu, 18 Nov 2021 10:59:32 +0100, Gabriele Cappelletto via lazarus wrote: Could you please STOP posting HTML-only messages to this mail list? They are completely unreadable and ALL your posts seem to look like this... > > > > > >

I think I have solved it, at least I think

>


>

>
Il 18/11/21 10:08, Gabriele Cappelletto > via lazarus ha scritto:
>
>
cite="mid:9ff39ec5-28d6-7938-f75d-1399bb95725a at yahoo.it"> > >

Without the PageClass line: = TExtPanel_Tab; not working, how > do you port in lazarus 2.2?

>

Thank
>

>
Il 01/10/21 18:19, Howard Page-Clark > via lazarus ha scritto:
>
>
cite="mid:249c3f4a-ca5b-8ab6-0d6c-7aa8418a4942 at talktalk.net"> > >
On 01/10/2021 16:32, Gabriele > Cappelletto via lazarus wrote:
>
>
cite="mid:12dc8636-832d-743b-faa9-934dd8515fb3 at yahoo.it"> > >


>

>

Sorry, I also allocate the complete file
>

>


>

>

Hello to all,
>

>

This code compiles with lazarus 2.0.12
>

>

constructor TExtTabPanel.Create(AOwner : TComponent);
> begin
> {$IFDEF LCL}
> ᅵᅵ PageClass := TExtPanel_Tab;
> {$ENDIF}
> ᅵ inherited Create(AOwner);
> ᅵ Disabled := False;
> ᅵ Hidden := False;
> end;ᅵ
>

>


>

>

but with lazarus 2.2 it gives me the following error:
>

>

extp_design_ctrls.pas(1247,4) Error: Identifier not > found "PageClass"
>

>

How do I resolve?
>

>
>
>
>

Remove the {$ifdef}...{$endif} altogether.

>

The reference to "PageClass" is presumably some leftover from > earlier code. It is not needed.
>

>
>
>
>
>
>
> > -- Bo Berglund Developer in Sweden From cappellettogabriele at yahoo.it Fri Nov 19 08:32:35 2021 From: cappellettogabriele at yahoo.it (Gabriele Cappelletto) Date: Fri, 19 Nov 2021 08:32:35 +0100 Subject: [Lazarus] Component compilation problem with lazarus 2.2 In-Reply-To: References: <12dc8636-832d-743b-faa9-934dd8515fb3.ref@yahoo.it> <12dc8636-832d-743b-faa9-934dd8515fb3@yahoo.it> <249c3f4a-ca5b-8ab6-0d6c-7aa8418a4942@talktalk.net> <9ff39ec5-28d6-7938-f75d-1399bb95725a@yahoo.it> Message-ID: <4cf63cc5-6987-f76c-988e-5ac0614d1140@yahoo.it> excuse me. hope this format is correct Il 19/11/2021 08:22, Bo Berglund via lazarus ha scritto: > On Thu, 18 Nov 2021 10:59:32 +0100, Gabriele Cappelletto via lazarus > wrote: > > Could you please STOP posting HTML-only messages to this mail list? > They are completely unreadable and ALL your posts seem to look like this... > >> >> >> >> >> >>

I think I have solved it, at least I think

>>


>>

>>
Il 18/11/21 10:08, Gabriele Cappelletto >> via lazarus ha scritto:
>>
>>
> cite="mid:9ff39ec5-28d6-7938-f75d-1399bb95725a at yahoo.it"> >> >>

Without the PageClass line: = TExtPanel_Tab; not working, how >> do you port in lazarus 2.2?

>>

Thank
>>

>>
Il 01/10/21 18:19, Howard Page-Clark >> via lazarus ha scritto:
>>
>>
> cite="mid:249c3f4a-ca5b-8ab6-0d6c-7aa8418a4942 at talktalk.net"> >> >>
On 01/10/2021 16:32, Gabriele >> Cappelletto via lazarus wrote:
>>
>>
> cite="mid:12dc8636-832d-743b-faa9-934dd8515fb3 at yahoo.it"> >> >>


>>

>>

Sorry, I also allocate the complete file
>>

>>


>>

>>

Hello to all,
>>

>>

This code compiles with lazarus 2.0.12
>>

>>

constructor TExtTabPanel.Create(AOwner : TComponent);
>> begin
>> {$IFDEF LCL}
>> ᅵᅵ PageClass := TExtPanel_Tab;
>> {$ENDIF}
>> ᅵ inherited Create(AOwner);
>> ᅵ Disabled := False;
>> ᅵ Hidden := False;
>> end;ᅵ
>>

>>


>>

>>

but with lazarus 2.2 it gives me the following error:
>>

>>

extp_design_ctrls.pas(1247,4) Error: Identifier not >> found "PageClass"
>>

>>

How do I resolve?
>>

>>
>>
>>
>>

Remove the {$ifdef}...{$endif} altogether.

>>

The reference to "PageClass" is presumably some leftover from >> earlier code. It is not needed.
>>

>>
>>
>>
>>
>>
>>
>> >> > From bo.berglund at gmail.com Sun Nov 21 00:01:54 2021 From: bo.berglund at gmail.com (Bo Berglund) Date: Sun, 21 Nov 2021 00:01:54 +0100 Subject: [Lazarus] Lazarus on Linux, which desktop environment? Message-ID: <9quipgl821j87f0fbl2la15792ft2tb9lt@4ax.com> I have been using Lazarus/FPC for a long time on Windows and also on Raspberry Pi Linux. I also have two laptops on which I run Ubuntu Mate 20.04.3, where I have installed Lazarus and FPC. That all works OK. But now I would like to put Lazarus/FPC on a dedicated Ubuntu *Server* 20.04.3 so I don't have to run the two laptops to access Lazarus. And this brings me to my question: I have understood that Lazarus behaves differently depending on the desktop environment on Linux, and at the same time I have great problems with using what comes with stock Ubuntu 20... So I want to get something that is working like Mint and still able to create applications that will run on stock Ubuntu. And the desktop environment I have to install should be light weight too, no office or video applications etc. Just basic tools for handling the system like GParted etc. I will access the desktop over the network using RealVNC on my Windows10 PC, so I have to install TigerVNC into the server after the desktop environment is in place. What should I install? Will KDE work? Or does in not matter for Lazarus? -- Bo Berglund Developer in Sweden From tony.whyman at mccallumwhyman.com Sun Nov 21 00:22:28 2021 From: tony.whyman at mccallumwhyman.com (tony.whyman) Date: Sat, 20 Nov 2021 23:22:28 +0000 Subject: [Lazarus] Lazarus on Linux, which desktop environment? In-Reply-To: <9quipgl821j87f0fbl2la15792ft2tb9lt@4ax.com> Message-ID: <202111202322.1AKNMVb1058568@mail2.mwassocs.co.uk> I have done this before using xvnc on a ubuntu server. Xvnc is an X server as far as the server is concerned. You will need a desktop environment such as Mate or KDE on top of it. Lazarus apps work fine. By default, they are linked into the gtk2 libs and you will to have them installed as well. If I recall correctly, xvnc is run under xinetd. The tricky bit is the login prompt. I ended up using xdm. Basic, but does the job. It seems to me .... that the advance of civilization is nothing but an exercise in the limiting of privacy.Isaac Azimov, Foundation's Edge (1982). -------- Original message --------From: Bo Berglund via lazarus Date: 20/11/2021 23:02 (GMT+00:00) To: lazarus at lists.lazarus-ide.org Cc: Bo Berglund Subject: [Lazarus] Lazarus on Linux, which desktop environment? I have been using Lazarus/FPC for a long time on Windows and also on RaspberryPi Linux.I also have two laptops on which I run Ubuntu Mate 20.04.3, where I haveinstalled Lazarus and FPC.That all works OK.But now I would like to put Lazarus/FPC on a dedicated Ubuntu *Server* 20.04.3so I don't have to run the two laptops to access Lazarus.And this brings me to my question:I have understood that Lazarus behaves differently depending on the desktopenvironment on Linux, and at the same time I have  great problems with usingwhat comes with stock Ubuntu 20...So I want to get something that is working like Mint and still able to createapplications that will run on stock Ubuntu.And the desktop environment I have to install should be light weight too, nooffice or video applications etc. Just basic tools for handling the system likeGParted etc.I will access the desktop over the network using RealVNC on my Windows10 PC, soI have to install TigerVNC into the server after the desktop environment is inplace.What should I install?Will KDE work?Or does in not matter for Lazarus?-- Bo BerglundDeveloper in Sweden-- _______________________________________________lazarus mailing listlazarus at lists.lazarus-ide.orghttps://lists.lazarus-ide.org/listinfo/lazarus -------------- next part -------------- An HTML attachment was scrubbed... URL: From m.e.sanliturk at gmail.com Sun Nov 21 00:53:35 2021 From: m.e.sanliturk at gmail.com (Mehmet Erol Sanliturk) Date: Sun, 21 Nov 2021 02:53:35 +0300 Subject: [Lazarus] Lazarus on Linux, which desktop environment? In-Reply-To: <9quipgl821j87f0fbl2la15792ft2tb9lt@4ax.com> References: <9quipgl821j87f0fbl2la15792ft2tb9lt@4ax.com> Message-ID: I am using Fedora distributions with KDE installed for my daily work and in a different NFS network using Fedora with KDE for Lazarus/FPC , Fortran and C programming . Previously I was using NFS and Samba together for the SAME NFS server in Fedora and KDE ( because it is easy to manage NFS server computers with KDE with respect to only "Fedora server" which is using command line management ) because of developing my programs also in Windows . ( When Linux is used only ) file names are consistently handled with respect to case sensitivity and file access rights . When Windows is used on the same NFS server through Samba , as a result of editing or touching file names , file names are converted to UPPERcase and their access rights are broken . In such a combined use , it is forced to use ONLY Windows to manage file names and access rights consistently . For that reason I have abandoned the use of Windows and continued with only Linux . It is possible to use Windows if you CAN ACCESS to NFS server from Windows ( if Windows is allowing such an access ) ( for ONLY compilations but never for editing ) ( because it is becoming necessary to adjust file names ( you may use UPPERcase in Linux also but sometimes this may NOT be possible ) and their access rights to enable to use them from Linux ) . In short , the use of such a combination ( as Linux and Windows ) is really difficult . It is possible to use KUbuntu ( KDE with Ubuntu ) . My choice is Fedora because I find it more easily usable and with respect to their *.rpm repository quality . With my best wishes for all of you , Mehmet Erol Sanliturk On Sun, Nov 21, 2021 at 2:02 AM Bo Berglund via lazarus < lazarus at lists.lazarus-ide.org> wrote: > I have been using Lazarus/FPC for a long time on Windows and also on > Raspberry > Pi Linux. > I also have two laptops on which I run Ubuntu Mate 20.04.3, where I have > installed Lazarus and FPC. > > That all works OK. > > But now I would like to put Lazarus/FPC on a dedicated Ubuntu *Server* > 20.04.3 > so I don't have to run the two laptops to access Lazarus. > > And this brings me to my question: > > I have understood that Lazarus behaves differently depending on the desktop > environment on Linux, and at the same time I have great problems with > using > what comes with stock Ubuntu 20... > > So I want to get something that is working like Mint and still able to > create > applications that will run on stock Ubuntu. > And the desktop environment I have to install should be light weight too, > no > office or video applications etc. Just basic tools for handling the system > like > GParted etc. > > I will access the desktop over the network using RealVNC on my Windows10 > PC, so > I have to install TigerVNC into the server after the desktop environment > is in > place. > > What should I install? > Will KDE work? > Or does in not matter for Lazarus? > > > -- > Bo Berglund > Developer in Sweden > > -- > _______________________________________________ > lazarus mailing list > lazarus at lists.lazarus-ide.org > https://lists.lazarus-ide.org/listinfo/lazarus > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bo.berglund at gmail.com Sun Nov 21 08:35:21 2021 From: bo.berglund at gmail.com (Bo Berglund) Date: Sun, 21 Nov 2021 08:35:21 +0100 Subject: [Lazarus] Lazarus on Linux, which desktop environment? References: <9quipgl821j87f0fbl2la15792ft2tb9lt@4ax.com> Message-ID: On Sun, 21 Nov 2021 02:53:35 +0300, Mehmet Erol Sanliturk via lazarus wrote: >It is possible to use KUbuntu ( KDE with Ubuntu ) . My choice is Fedora >because I find it more easily usable and with respect to their *.rpm >repository quality . Thanks, but my server is *already* installed and running (using Ubuntu Server 20.04.3) and I am only wanting to *add* a light-weight desktop environment to be able to use some graphics tools for administration work on the server (such as Gparted etc). And of course to use Lazarus directly on this server to build some Linux tools etc. But it will be accessed using VNC from my Windows box. My question is asked from my worry that Lazarus itself will add dependencies on the desktop environment, which do not match the target system environments.... So I am looking for a *desktop environment* to be installed on a server currently *without* a desktop so Lazarus can be used to create apps that will work universally on Linux. -- Bo Berglund Developer in Sweden From michael at freepascal.org Sun Nov 21 09:33:12 2021 From: michael at freepascal.org (Michael Van Canneyt) Date: Sun, 21 Nov 2021 09:33:12 +0100 (CET) Subject: [Lazarus] Lazarus on Linux, which desktop environment? In-Reply-To: References: <9quipgl821j87f0fbl2la15792ft2tb9lt@4ax.com> Message-ID: On Sun, 21 Nov 2021, Bo Berglund via lazarus wrote: > On Sun, 21 Nov 2021 02:53:35 +0300, Mehmet Erol Sanliturk via lazarus > wrote: > >> It is possible to use KUbuntu ( KDE with Ubuntu ) . My choice is Fedora >> because I find it more easily usable and with respect to their *.rpm >> repository quality . > > Thanks, > but my server is *already* installed and running (using Ubuntu Server 20.04.3) > and I am only wanting to *add* a light-weight desktop environment to be able to > use some graphics tools for administration work on the server (such as Gparted > etc). > And of course to use Lazarus directly on this server to build some Linux tools > etc. But it will be accessed using VNC from my Windows box. > > My question is asked from my worry that Lazarus itself will add dependencies on > the desktop environment, which do not match the target system environments.... > > So I am looking for a *desktop environment* to be installed on a server > currently *without* a desktop so Lazarus can be used to create apps that will > work universally on Linux. It does not matter what environment you install. The only thing that matters is that the final environment has the necessary libraries for the widgetset with which you compile your application. Currently that is by default gtk2. You can install KDE, but then installing Lazarus will most likely add the GTK libraries as a dependency. So the easiest is to install something that is GTK based, like MATE as used in linux mint. Michael. From juha.manninen62 at gmail.com Sun Nov 21 10:45:57 2021 From: juha.manninen62 at gmail.com (Juha Manninen) Date: Sun, 21 Nov 2021 11:45:57 +0200 Subject: [Lazarus] Lazarus on Linux, which desktop environment? In-Reply-To: References: <9quipgl821j87f0fbl2la15792ft2tb9lt@4ax.com> Message-ID: On Sun, Nov 21, 2021 at 10:33 AM Michael Van Canneyt via lazarus < lazarus at lists.lazarus-ide.org> wrote: > You can install KDE, but then installing Lazarus will most likely add the > GTK libraries as a dependency. > With KDE I recommend Lazarus with LCL-QT5 bindings. KDE itself is based on QT5. LCL-QT5 works better than LCL-GTK2 now IMO. Regards, Juha -------------- next part -------------- An HTML attachment was scrubbed... URL: From badsectoracula at gmail.com Sun Nov 21 12:06:00 2021 From: badsectoracula at gmail.com (Kostas Michalopoulos) Date: Sun, 21 Nov 2021 13:06:00 +0200 Subject: [Lazarus] Lazarus on Linux, which desktop environment? In-Reply-To: References: <9quipgl821j87f0fbl2la15792ft2tb9lt@4ax.com> Message-ID: <29ddbae7-9759-8322-1a30-fb7b6fc41d87@gmail.com> On 11/21/21 11:45, Juha Manninen via lazarus wrote: > LCL-QT5 works better than LCL-GTK2 now IMO. What are the issues on Gtk2 that are fixed in Qt5? Kostas From m.e.sanliturk at gmail.com Sun Nov 21 12:10:07 2021 From: m.e.sanliturk at gmail.com (Mehmet Erol Sanliturk) Date: Sun, 21 Nov 2021 14:10:07 +0300 Subject: [Lazarus] Lazarus on Linux, which desktop environment? In-Reply-To: References: <9quipgl821j87f0fbl2la15792ft2tb9lt@4ax.com> Message-ID: Please do not assume that I am suggesting you change your server and waste your efforts . My aim is to define my approach with its reasons . If I were you I would prefer to use KDE . I am very satisfied with my use of KDE . When I use FreeBSD together with LInux I am using KDE also in FreeBSD . My difficulty in FreeBSD due to KDE is the following : KDE is completing missing parts of Linux . In FreeBSD we can say that there are no such missing parts ( it is a complete operating system ) . Management of additional parts in KDE is causing mismatches with FreeBSD . There I do not see any problem . KDE is supplying to me a consistent environment between different operating systems . Important feature of KDE is its restartability of the previous session when the computer is shutdown . To my knowledge , the other desktops are not supplying such a feature . This view may be wrong because I did not try the other desktops other than Gnome . Up to now I did not encounter a "desktop" which is not "graphical" . The shell in Unix ( variants such as FreeBSD , Linux or others ) are using "shell" . You may search the following phrases in Google one by one : non graphical desktops non graphical desktop linux desktop environments ubuntu desktop environments ubuntu server desktop environments ubuntu server web GUI ubuntu server management web interface I think you will find a suitable solution for your works When you study the following pages and their associated subpages , it will be evident that there is no any non-gui desktop but "lightweight gui desktops" : https://en.wikipedia.org/wiki/Desktop_environment https://en.wikipedia.org/wiki/Command-line_interface https://en.wikipedia.org/wiki/Category:Desktop_environments Mehmet Erol Sanliturk On Sun, Nov 21, 2021 at 10:35 AM Bo Berglund via lazarus < lazarus at lists.lazarus-ide.org> wrote: > On Sun, 21 Nov 2021 02:53:35 +0300, Mehmet Erol Sanliturk via lazarus > wrote: > > >It is possible to use KUbuntu ( KDE with Ubuntu ) . My choice is Fedora > >because I find it more easily usable and with respect to their *.rpm > >repository quality . > > Thanks, > but my server is *already* installed and running (using Ubuntu Server > 20.04.3) > and I am only wanting to *add* a light-weight desktop environment to be > able to > use some graphics tools for administration work on the server (such as > Gparted > etc). > And of course to use Lazarus directly on this server to build some Linux > tools > etc. But it will be accessed using VNC from my Windows box. > > My question is asked from my worry that Lazarus itself will add > dependencies on > the desktop environment, which do not match the target system > environments.... > > So I am looking for a *desktop environment* to be installed on a server > currently *without* a desktop so Lazarus can be used to create apps that > will > work universally on Linux. > > > -- > Bo Berglund > Developer in Sweden > > -- > _______________________________________________ > lazarus mailing list > lazarus at lists.lazarus-ide.org > https://lists.lazarus-ide.org/listinfo/lazarus > -------------- next part -------------- An HTML attachment was scrubbed... URL: From mailinglists at geldenhuys.co.uk Sun Nov 21 12:18:42 2021 From: mailinglists at geldenhuys.co.uk (Graeme Geldenhuys) Date: Sun, 21 Nov 2021 11:18:42 +0000 Subject: [Lazarus] Asteroids in Pascal In-Reply-To: References: Message-ID: On 2021-11-09 6:32 p.m., Anthony Walter via lazarus wrote: > I've included a copy of the entire game logic code. Check it out here: Such a cool game. :-D Thank you for sharing. Regards, Graeme From michael at freepascal.org Sun Nov 21 12:28:55 2021 From: michael at freepascal.org (Michael Van Canneyt) Date: Sun, 21 Nov 2021 12:28:55 +0100 (CET) Subject: [Lazarus] Lazarus on Linux, which desktop environment? In-Reply-To: References: <9quipgl821j87f0fbl2la15792ft2tb9lt@4ax.com> Message-ID: On Sun, 21 Nov 2021, Juha Manninen via lazarus wrote: > On Sun, Nov 21, 2021 at 10:33 AM Michael Van Canneyt via lazarus < > lazarus at lists.lazarus-ide.org> wrote: > >> You can install KDE, but then installing Lazarus will most likely add the >> GTK libraries as a dependency. >> > > With KDE I recommend Lazarus with LCL-QT5 bindings. > KDE itself is based on QT5. > LCL-QT5 works better than LCL-GTK2 now IMO. I am not commenting on the relative merits/stability of the widgetsets, but if OP will install using the system package manager, then the gtk version of Lazarus is most likely what will be installed on an ubuntu based system. Keeping that in mind, I'm simply recommending to follow the path of least resistance. Michael. From m.e.sanliturk at gmail.com Sun Nov 21 12:36:55 2021 From: m.e.sanliturk at gmail.com (Mehmet Erol Sanliturk) Date: Sun, 21 Nov 2021 14:36:55 +0300 Subject: [Lazarus] Lazarus on Linux, which desktop environment? In-Reply-To: References: <9quipgl821j87f0fbl2la15792ft2tb9lt@4ax.com> Message-ID: If you please study TrueNAS , you will see that it is possible to manage a server with a "Web-based graphical user interface with optional SSL encryption" from your computer using a GUI desktop connected to the server in your local network . I do not know Ubuntu server in detail but there should be such features . This means that you do not need to convert your server to a gui desktop using state but to select a suitable web based management system and install it ( or them ) to manage your server from your workstation . Mehmet Erol Sanliturk On Sun, Nov 21, 2021 at 11:33 AM Michael Van Canneyt via lazarus < lazarus at lists.lazarus-ide.org> wrote: > > > On Sun, 21 Nov 2021, Bo Berglund via lazarus wrote: > > > On Sun, 21 Nov 2021 02:53:35 +0300, Mehmet Erol Sanliturk via lazarus > > wrote: > > > >> It is possible to use KUbuntu ( KDE with Ubuntu ) . My choice is Fedora > >> because I find it more easily usable and with respect to their *.rpm > >> repository quality . > > > > Thanks, > > but my server is *already* installed and running (using Ubuntu Server > 20.04.3) > > and I am only wanting to *add* a light-weight desktop environment to be > able to > > use some graphics tools for administration work on the server (such as > Gparted > > etc). > > And of course to use Lazarus directly on this server to build some Linux > tools > > etc. But it will be accessed using VNC from my Windows box. > > > > My question is asked from my worry that Lazarus itself will add > dependencies on > > the desktop environment, which do not match the target system > environments.... > > > > So I am looking for a *desktop environment* to be installed on a server > > currently *without* a desktop so Lazarus can be used to create apps that > will > > work universally on Linux. > > It does not matter what environment you install. > > The only thing that matters is that the final environment has the necessary > libraries for the widgetset with which you compile your application. > Currently that is by default gtk2. > > You can install KDE, but then installing Lazarus will most likely add the > GTK libraries as a dependency. > > > So the easiest is to install something that is GTK based, like MATE as used > in linux mint. > > Michael. > -- > _______________________________________________ > lazarus mailing list > lazarus at lists.lazarus-ide.org > https://lists.lazarus-ide.org/listinfo/lazarus > -------------- next part -------------- An HTML attachment was scrubbed... URL: From m.e.sanliturk at gmail.com Sun Nov 21 12:51:44 2021 From: m.e.sanliturk at gmail.com (Mehmet Erol Sanliturk) Date: Sun, 21 Nov 2021 14:51:44 +0300 Subject: [Lazarus] Lazarus on Linux, which desktop environment? In-Reply-To: References: <9quipgl821j87f0fbl2la15792ft2tb9lt@4ax.com> Message-ID: In this thread there is a point which is not clear for me : Compile (1) programs in SERVER by using Lazarus installed in SERVER (2) programs in SERVER by using Lazarus installed in WORKSTATIONS These are different approaches for the development and use of programs . Therefore these require different steps to accomplish the goals . If the workstations are different as structure ( amd , arm , ... , or FreeBSD , Linux , Windows , ... ) then in a server with a SINGLE structure such as amd or arm , I can not say what we can do in a useful way for the development of programs other than use of cross compilation . Mehmet Erol Sanliturk On Sun, Nov 21, 2021 at 2:28 PM Michael Van Canneyt via lazarus < lazarus at lists.lazarus-ide.org> wrote: > > > On Sun, 21 Nov 2021, Juha Manninen via lazarus wrote: > > > On Sun, Nov 21, 2021 at 10:33 AM Michael Van Canneyt via lazarus < > > lazarus at lists.lazarus-ide.org> wrote: > > > >> You can install KDE, but then installing Lazarus will most likely add > the > >> GTK libraries as a dependency. > >> > > > > With KDE I recommend Lazarus with LCL-QT5 bindings. > > KDE itself is based on QT5. > > LCL-QT5 works better than LCL-GTK2 now IMO. > > I am not commenting on the relative merits/stability of the widgetsets, > but if OP will install using the system package manager, then the gtk > version of Lazarus is most likely what will be installed on an ubuntu > based system. > > Keeping that in mind, I'm simply recommending to follow the path of least > resistance. > > Michael. > -- > _______________________________________________ > lazarus mailing list > lazarus at lists.lazarus-ide.org > https://lists.lazarus-ide.org/listinfo/lazarus > -------------- next part -------------- An HTML attachment was scrubbed... URL: From michael at freepascal.org Sun Nov 21 13:01:15 2021 From: michael at freepascal.org (Michael Van Canneyt) Date: Sun, 21 Nov 2021 13:01:15 +0100 (CET) Subject: [Lazarus] Lazarus on Linux, which desktop environment? In-Reply-To: References: <9quipgl821j87f0fbl2la15792ft2tb9lt@4ax.com> Message-ID: On Sun, 21 Nov 2021, Mehmet Erol Sanliturk wrote: > If you please study TrueNAS , you will see that it is possible to manage a > server with a > > "Web-based graphical user interface > with optional SSL > encryption" > > from your computer using a GUI desktop connected to the server in your > local network . > > I do not know Ubuntu server in detail but there should be such features . > > This means that you do not need to convert your server to a gui desktop > using state but to select a suitable web based management system > and install it ( or them ) to manage your server from your workstation . OP wants to run Lazarus on his server. So he needs to install a desktop environment, because lazarus needs a GUI. It is possible to run lazbuild on a server without gui, if it is just used to compile. But from whay I understood, the OP wants to actually run Lazarus in a remote X session. In that case a WEB gui is not useful. Michael. From m.e.sanliturk at gmail.com Sun Nov 21 13:23:38 2021 From: m.e.sanliturk at gmail.com (Mehmet Erol Sanliturk) Date: Sun, 21 Nov 2021 15:23:38 +0300 Subject: [Lazarus] Lazarus on Linux, which desktop environment? In-Reply-To: References: <9quipgl821j87f0fbl2la15792ft2tb9lt@4ax.com> Message-ID: I agree with you. On Sun, Nov 21, 2021 at 3:01 PM Michael Van Canneyt wrote: > > > On Sun, 21 Nov 2021, Mehmet Erol Sanliturk wrote: > > > If you please study TrueNAS , you will see that it is possible to manage > a > > server with a > > > > "Web-based graphical user interface > > with optional > SSL > > encryption" > > > > from your computer using a GUI desktop connected to the server in your > > local network . > > > > I do not know Ubuntu server in detail but there should be such features . > > > > This means that you do not need to convert your server to a gui desktop > > using state but to select a suitable web based management system > > and install it ( or them ) to manage your server from your workstation . > > OP wants to run Lazarus on his server. So he needs to install a desktop > environment, because lazarus needs a GUI. > > It is possible to run lazbuild on a server without gui, if it is just used > to compile. > But from whay I understood, the OP wants to actually run Lazarus in a > remote X session. > > In that case a WEB gui is not useful. > > Michael. > -------------- next part -------------- An HTML attachment was scrubbed... URL: From juha.manninen62 at gmail.com Sun Nov 21 17:14:36 2021 From: juha.manninen62 at gmail.com (Juha Manninen) Date: Sun, 21 Nov 2021 18:14:36 +0200 Subject: [Lazarus] Lazarus on Linux, which desktop environment? In-Reply-To: <29ddbae7-9759-8322-1a30-fb7b6fc41d87@gmail.com> References: <9quipgl821j87f0fbl2la15792ft2tb9lt@4ax.com> <29ddbae7-9759-8322-1a30-fb7b6fc41d87@gmail.com> Message-ID: On Sun, Nov 21, 2021 at 1:06 PM Kostas Michalopoulos via lazarus < lazarus at lists.lazarus-ide.org> wrote: > On 11/21/21 11:45, Juha Manninen via lazarus wrote: > > LCL-QT5 works better than LCL-GTK2 now IMO. > > What are the issues on Gtk2 that are fixed in Qt5? > Different LCL bindings have their own bugs, and so do the underlying libraries GTK2, QT5 etc. LCL-QT5 and LCL-GTK2 both have bugs but LCL-QT5 has less of them. The underlying QT5 is also less buggy than the old GTK2. I agree with Michael. You need GTK2 development libraries initially when building Lazarus from sources with "make". LCL-QT5 bindings require the libQT5Pas (IIRC) which must be installed manually in some systems. Manjaro + KDE has it nicely as a dependency. Once you have them both installed you can freely select your favorite widgetset. Juha -------------- next part -------------- An HTML attachment was scrubbed... URL: From lazarus at mfriebe.de Sun Nov 21 17:23:46 2021 From: lazarus at mfriebe.de (Martin Frb) Date: Sun, 21 Nov 2021 17:23:46 +0100 Subject: [Lazarus] Playing with debuggers In-Reply-To: <55474783-13b9-66da-1f5d-387e94aacf1a@cnoc.nl> References: <55474783-13b9-66da-1f5d-387e94aacf1a@cnoc.nl> Message-ID: <74e6b702-2efc-dc91-b5fb-78f8deb1e1fe@mfriebe.de> On 14/09/2021 01:00, Joost van der Sluis via lazarus wrote: > I've created a new Lazarus-debugger LazDabDebugger that can work with > FpdServer. It depends on a package (LazDebugExtensionIntf) that adds > another way of showing debugging variables inside Lazarus. > I can write tons of texts about the background and possibilities. But > for now I'm just curious at your input. Ok, lets try to pick up on where we were.  / Going through the thread, picking out previous comments. The main points seem to be: 1) Events to be more frontend centric. 2) Actions (eval watch) to be triggered by the frontend 3) Representation of an "watch"  (Should methods be on the Watch object, or the Debugger object) I think, I will write individual mails on each of them. From lazarus at mfriebe.de Sun Nov 21 17:23:53 2021 From: lazarus at mfriebe.de (Martin Frb) Date: Sun, 21 Nov 2021 17:23:53 +0100 Subject: [Lazarus] Events to be more frontend centric [[was: Re: Playing with debuggers]] In-Reply-To: <55474783-13b9-66da-1f5d-387e94aacf1a@cnoc.nl> References: <55474783-13b9-66da-1f5d-387e94aacf1a@cnoc.nl> Message-ID: > 1) Events to be more frontend centric. > 2) Actions (eval watch) to be triggered by the frontend > 3) Representation of an "watch"  (Should methods be on the Watch > object, or the Debugger object) =====> 1) Events to be more frontend centric. The current events and especially states are certainly in need of clean up. I would not say that they are all backend centric. States like: dsRun, dsPause, dsStop  are very valid and meaningful for the frontends too. On the other hand states like - dsDestroying is backend only, and should not be exposed. - dsInit, dsInternalPause are not well defined at all. Looking at your code, I do not agree with your new states. >   TLazExtEvaluationState = ( >     esNone,                  // No debugger available >     esEvaluationImpossible,  // Evaluation of variables is impossible > (Maybe because there is nu debugee? (stopped)) >     esEvaluationPaused,      // Evaluation of variables is temporarily > disabled (Maybe because debugee is running?) >     esEvaluationPossible     // Evaluation of variables is possible > (Debugee is probably paused) >   ); 1 - First of all, The above are either a- not enough b- to many a) There may be different extends of evaluation in the frontend. So more info than the above few states is needed. => Of course, the states may be sufficient, as further info could be maintained within the frontend. * I quite often use breakpoints, that do not "break" (continue automatically), but take a history snapshot. Currently when this happens the watch/stack/.. windows actually do update (and that is a workaround to missing options). But ideally they should not. Only the history-snapshot should run. * Or while viewing history => one can get existing values, but not evaluate new ones. b) On the other hand, why differ between Paused and Impossible? They both mean "can't eval". Your frontend may differ between the 2 reasons behind them. But other Frontends, relay on other factors. After writing all the below, I realized that (probably) your frontend uses the 2 states to decide, if there should be a timeout before clearing the values? But that is very specific to your frontend (well most frontends probably would benefit). But then this is just a duplication of the existing and further needed dsStop. See idea on "CurrentCapacities" below. 2 - Second, they already exist:    WatchValue.Validity => ddsUnknown, ddsRequested, ddsEvaluating,  ddsValid, ddsInvalid, ddsError Though they are only set, once a value gets requested. (Asking upfront, may be an idea, but one only need "function CanEval: boolean". / See idea on "CurrentCapacities" below.) This falls partly under the topic (3) representation => should the state come via the watch or the debugger. And then, if history is shown, there is no point of calling a function on the debugger. There is no data to be computed by the debugger. 3 - Third Also, while your argument for a frontend-needs driven event system is compiling, we need to keep in mind, that the frontend (or plural frontends) may change/differ how they want to react to different backend states. The backends can not actually know this. So the frontend still needs (most of) the DebuggerStates (dsPause, dsRun, dsStopped) Yet, as mentioned above, (sub)states may need to be added for different "pause reasons". This may be something (some/all) frontends can do on their own. But some may also belong into the backend. (Maybe such as, that the backend is going to continue the run/step) If a breakpoint has "no break" or "auto-continue" (the latter differs from the first), then parts of the frontend may need to know. This can to some extend be managed in the frontend itself, by examining the current breakpoint(s) [1]. But it can't be entirely taken from the backend, because if the backends state is "mid single step", then the frontend can not sent a "step over". If maintaining some of the state info is moved to the frontend, this must avoid duplicating info that is bound to the backend. (to avoid them becoming out of sync). [1] Btw, off topic, there may be more than one breakpoint on the same address, so there needs to be a list of breakpoints hit... ===> Going forward It might be best to look at an actual list of new states and events. - What do different parts of the frontend need to react to (events)?   And can/should the backend(s) know about each of those "causes". - What states are important, from a frontend/users view. - What mapping, between abilities and state do we need, and where to compute them. For example the debugger already has     function  GetCommands: TDBGCommands; virtual; // property Commands And this returns what is currently possible     if dcEvaluate in Commands then {watches can be evaluated} - Except, that may be returning wrong for dsInternalPause => so there is some fixing needed. - The naming is bad, because its more than just commands. Maybe should be:    ~ dcEvaluate in CurrentCapacities    ~ Debugger.Is[Currently]Capable(dcEvaluate)    ~ dcEvaluate may be to narrow, if it includes ability to read/provide stack/thread/... Or maybe there can be separate enums. As for events, here are the events that currently can trigger watches to be refreshed: By the debugger (IIRC)   WatchesNotification.OnUpdate    := @WatchUpdate;     // send by the debugger  WITH watch=NIL, equal to the callback in your code     // send by the debugger  WITH watch<>NIL, equal to edeEvalutionStateChanged   ThreadsNotification.OnCurrent   := @ContextChanged;   CallstackNotification.OnCurrent := @ContextChanged; By the frontend itself   WatchesNotification.OnAdd       := @WatchAdd;   WatchesNotification.OnRemove    := @WatchRemove;   SnapshotNotification.OnCurrent  := @SnapshotChanged; WatchesNotification.OnUpdate could be split into 2 events. It is also the same for start/end availability of data. That may want to be extended. Though the info can already be retrieved from the debugger. (DebuggerState / Commands) Yet it is not even needed to get the state. (Or should not, I have to check if it works). The watchvalues validity should be enough. If correct, it should be ddsInvalid. If a "ddsEvalNotPossible" is added, then the info is avail (and the timeout can be set, depending on debuggerState) The threads and callstack need to be separate notification, Different windows may subscribe to different sets of them. So I am not sure, if indeed we need an entire new event system. One could argue that thread and stack should trigger WatchesNotification.OnUpdate. But that would be wrong. => I have often thought it would be good to have a 2nd (or more) watch window, and have a setting for that window to stay at a fixed thread/stack, even if the selection in the stack window is changed. - So such a window, would not change if the current stack in the stackwindow was changed - But it would need to reload, if the user changed the value of a watch, and therefore modified the target memory. (which could affect other watches too) So in the end, the watches window needs to be able to decide which events it wants. On 14/09/2021 11:00, Joost van der Sluis via lazarus wrote: > > I have something similar as the data-monitors. > > Main difference is that the events are based on what the gui needs, > instead of what the debugger does. > > So: there is an event to tell the 'gui' that it is inpossible to show > any data. (for example: the application has stopped or there is no > debugger at all) There is an event for the case that debug-data has > become available or unavailable. (Application paused or continued)  We have an event, when watches can start to be evaled "WatchesNotification.OnUpdate". See above. > > The advantage of 'events' that are more geared towards the gui, is > that it is easier to add catchy things. For example: to avoid > flickering, when the gui receives an event that debug-data is not > available anymore, it starts a timer of 200 mseconds, and only after > that timer the data is removed from the screen. This way, when > stepping through the code, there is no flickering in the small periods > of time that the application runs. > > It also made it easy to highlight variables that changed. > Both can be done, with the existing system. Though some optimizations can be applied. From lazarus at mfriebe.de Sun Nov 21 17:23:59 2021 From: lazarus at mfriebe.de (Martin Frb) Date: Sun, 21 Nov 2021 17:23:59 +0100 Subject: [Lazarus] triggered by the frontend / Representation of an "watch" [[was: Re: Playing with debuggers]] In-Reply-To: <55474783-13b9-66da-1f5d-387e94aacf1a@cnoc.nl> References: <55474783-13b9-66da-1f5d-387e94aacf1a@cnoc.nl> Message-ID: > 1) Events to be more frontend centric. > 2) Actions (eval watch) to be triggered by the frontend > 3) Representation of an "watch"  (Should methods be on the Watch > object, or the Debugger object) =====> 2) Actions (eval watch) to be triggered by the frontend The evaluation of a watch is triggered when the frontend attempts to access it. The backend then gets a call to      TWatchesSupplier.InternalRequestData(AWatchValue: TWatchValue) for that one watch. For all I can see neither gdb, nor Fp backends will evaluate any watch, unless the frontend asks. =====> 3) Representation of an "watch"  (Should methods be on the Watch object, or the Debugger object) You introduced a new method to get a watch value.   Debugger.EvaluateExpression(S, Debugger.GetCurrentFrameID, FLatestRef, @EvaluateCallback) and then in the callback the data is in an object: TLazDebugExtensionVariable TLazDebugExtensionVariable has a reference, where the debugger can store any data it wants: integer or object I am trying to see, what advantage this should bring over the current system: * TIdeWatch / TCurrentWatch   => those can nicely store all the data a frontend needs to store with the watch (any options the user did chose).   => this also stores (as TWatchValue) the result returned from the debugger.   => Each frontend can subclass it as it wants. * The frontend decides when it wants the data. The backend then receives a single call for this/each watch. * The backend then send a notification for the frontend, when the data is there. Same flow? Main difference is that the methods to invoke the evaluation are on the TWatch. -------------- So far so good. - The TWatch class is currently quite big. It might benefit from some cut down, but that is not related to any of the things you implemented. - An advantage is, that a watch eval can be aborted.   Your concept is to discard unwanted results, but the backend still spends time on evaluating it. Of course you could add      dbg.AbortEval(reference);   In the end, I prefer to encapsulate this into the TWatch. - Watches are stored in a list. That is needed by the frontend. Because the History wants to know about the watches. However, this may not be needed by the backend. That can be reviewed. -------------- Collapsing / Expanding Currently watches can only be added by the frontend. That may need to be changed. Each watch needs a way to ask the debugger for the TWatchValue data of its children. => For that the Watch could call the backend   dbg.GetChildren(self); =>  The backend would then for each child call   watch.GetChildWatch and the backend would put the data in. Something like that..... As for the TWatches list: The watch window would know, which watches are visible (expanded) and evaluate them. For the history, each watch could have a "parent" and/or "CurrentVisible" field. Or the watch has an "Owner" (the window), which can be asked. On 14/09/2021 16:11, Joost van der Sluis via lazarus wrote: > The big advantage of the tree-view, is that you do not evaluate > sub-watches, only when they have to be shown. So only those fields > that need to be shown have to be evaluated by gdb. (It also solves the > endless loop you sometimes have) Well at latest when the debugger is idle, evaluation of watches "not scrolled in" should start. So when the user starts scrolling, values can be shown immediately. -------------- next part -------------- An HTML attachment was scrubbed... URL: From lazarus at mfriebe.de Sun Nov 21 17:42:20 2021 From: lazarus at mfriebe.de (Martin Frb) Date: Sun, 21 Nov 2021 17:42:20 +0100 Subject: [Lazarus] triggered by the frontend / Representation of an "watch" [[was: Re: Playing with debuggers]] In-Reply-To: References: <55474783-13b9-66da-1f5d-387e94aacf1a@cnoc.nl> Message-ID: On 21/11/2021 17:23, Martin Frb via lazarus wrote: > > - Watches are stored in a list. > That is needed by the frontend. Because the History wants to know > about the watches. > However, this may not be needed by the backend. That can be reviewed. Actually, there only is a list for the frontend. It is currently part of the DbgIntf. But it should not be. And should be easily fixable. The backend site has (through a forward handler) access to it. The only use that is made of it, is to invalidate all watch values, if they changed (actually this is only used, if the user modified a watch). The debugger should in that case send an event (or call an abstract method in the base class). This can then clear the values. And the entire TWatches list can move up, into the current frontend. From bo.berglund at gmail.com Sun Nov 21 20:55:41 2021 From: bo.berglund at gmail.com (Bo Berglund) Date: Sun, 21 Nov 2021 20:55:41 +0100 Subject: [Lazarus] Lazarus on Linux, which desktop environment? References: <9quipgl821j87f0fbl2la15792ft2tb9lt@4ax.com> Message-ID: On Sun, 21 Nov 2021 14:51:44 +0300, Mehmet Erol Sanliturk via lazarus wrote: >In this thread there is a point which is not clear for me : > >Compile > >(1) programs in SERVER by using Lazarus installed in SERVER >(2) programs in SERVER by using Lazarus installed in WORKSTATIONS I mean: Compile programs on the server (Lazarus running on the server) for use on any Linux machine based on The PC architecture (AMD/Intel CPU). >other than use of cross compilation . I have never ever managed to set up a dev environment that could cross-compile, so I have to keep at least 3 different dev environments: - Linux on Raspberry Pi (ARM) - Linux on PC platform (AMD/Intel CPU) - Windows on PC (AMD/Intel CPU) By compiling on the target "metal" I am sure the programs will run properly... And for Linux I access the computers via VNC when I work. So I use my Windows 10 box as the work environment always. -- Bo Berglund Developer in Sweden From m.e.sanliturk at gmail.com Mon Nov 22 00:09:18 2021 From: m.e.sanliturk at gmail.com (Mehmet Erol Sanliturk) Date: Mon, 22 Nov 2021 02:09:18 +0300 Subject: [Lazarus] Lazarus on Linux, which desktop environment? In-Reply-To: References: <9quipgl821j87f0fbl2la15792ft2tb9lt@4ax.com> Message-ID: On Sun, Nov 21, 2021 at 10:55 PM Bo Berglund via lazarus < lazarus at lists.lazarus-ide.org> wrote: > On Sun, 21 Nov 2021 14:51:44 +0300, Mehmet Erol Sanliturk via lazarus > wrote: > > >In this thread there is a point which is not clear for me : > > > >Compile > > > >(1) programs in SERVER by using Lazarus installed in SERVER > >(2) programs in SERVER by using Lazarus installed in WORKSTATIONS > > I mean: > Compile programs on the server (Lazarus running on the server) for use on > any > Linux machine based on The PC architecture (AMD/Intel CPU). > I have read all of the messages in this thread starting from your initial email once more . When you compile a program , it is possible to execute it another Windows machine by assuming that the next Windows version is able to execute the program . In the Linux ( or Unix ) world , this is NOT the case : Each Linux version of each Linux distribution has its OWN library versions : There is NOT any standard library usage plan among the Linux versions or Linux distributions . Therefore , it is very likely ( with respect to me : exactly ) that you will NOT be able to run your program in arbitrary Linux distributions IF YOU USE DYNAMICALLY LOADED LIBRARIES . I do not know the situation when you use statically linked libraries . it is always not possible to use static linking because each library does NOT have static libraries . When there is not a static library , you need to compile the respective sources to obtain a static library WITH A SERIOUS CONSIDERATION OF STATIC LINKING POSSIBILITY BY STUDYING ITS LICENSE VERY CAREFULLY . I can explain the situation with an example . I have a Fedora Linux computer having a large number of repositories stored in a different disk from the Fedora 28 installed disk . During a country-wise electric fluctuation my Fedora 28 disk has been broken . I have installed Fedora 25 . Now ALL of the programs are NOT executable because of dynamically loaded ( *.so ) libraries by giving an error message about *.so library mismatch . I will install Fedora 35 . This will also require recompilation of ALL of the repositories one by one . Therefore , my opinion is your plan WILL NOT work if you use *.so libraries , and try them to execute in different Linux computers with different *.so files . You may think that ALL of the *.so files of the libraries ARE the SAME : NO ! In your executable , the EXACT library version is recorded . During execution of the program , the *.so file is NOT loaded , but its EXACT matching name is searched : If it is NOT found , it is giving a message saying that the required exact *.so file is not found : *.so file with exact version number : for example : *.so.5.4.3 . You need to check the static linking case whether it is possible to execute your program in different Linux ( versions , distributions ) . I do not know the situation based on experiments because in my NFS server , all of the clients have the same Fedora version . Version of the NFS server may be different from the client versions ( assume NFS versions are the same or compatible ) . In the NFS server , there are the following directories alongside the source directories : Executables_for_FreeBSD Executables_for_Linux Previously , also Executables_for_Windows_XP Executables_for_Windows_7 I could NOT be able to connect to Windows_7 . Due to this I have removed WIndows directories and I have discontinued use of Windows . >From any client I am compiling ( Lazarus is installed in the client , BUT you can install Lazarus in the server IF YOUR VERSIONS OF CLIENTS and SERVER ARE THE SAME in LINUX if you use *.so libraries and use it from the clients . If you use static linking , please check the result . Do not forget that you will not be able to install Lazarus for FreeBSD in server because it is Linux ( or different from the client ) ) programs by storing its executables into respective Linux or FreeBSD directory and execute the programs in any client from its respective directory . As a result , my idea about your setup is : It requires adjusting parameters of the components to obtain a consistent work environment with respect to your needs and availability of your tools . If you want to sell your program(s) to Linux user customers : My suggestion would be ( you may think a much more suitable method , or some other experts may suggest other ways ) : Ask them to learn their Linux distribution and its version and hardware kind . On a similar hardware and Linux distribution and version , install Lazarus , compile your program(s) from your source repository and supply your program(s) to your customer . Mehmet Erol Sanliturk > >other than use of cross compilation . > > I have never ever managed to set up a dev environment that could > cross-compile, > so I have to keep at least 3 different dev environments: > > - Linux on Raspberry Pi (ARM) > - Linux on PC platform (AMD/Intel CPU) > - Windows on PC (AMD/Intel CPU) > > By compiling on the target "metal" I am sure the programs will run > properly... > > And for Linux I access the computers via VNC when I work. So I use my > Windows 10 > box as the work environment always. > > > -- > Bo Berglund > Developer in Sweden > > -- > _______________________________________________ > lazarus mailing list > lazarus at lists.lazarus-ide.org > https://lists.lazarus-ide.org/listinfo/lazarus > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bo.berglund at gmail.com Mon Nov 22 00:27:52 2021 From: bo.berglund at gmail.com (Bo Berglund) Date: Mon, 22 Nov 2021 00:27:52 +0100 Subject: [Lazarus] Where do I get the Lazarus sources on the release tag? Message-ID: I have a script to install Lazarus and FPC on Linux which exports the sources from the subversion repositories on the release tags. I use this when installing FPC/Lazarus on Raspberry Pi and other Linux devices. But that does not work anymore because of the move to gitlab: >From an earlier post on this list: > In order to lower maintenance of their own infrastructure, a hosted solution > has been chosen, and an open source license was granted to the teams. > > You can see the current progress at: > > https://gitlab.com/freepascal.org > > 2 subgroups have been made: > > https://gitlab.com/freepascal.org/fpc > https://gitlab.com/freepascal.org/lazarus-ide Unfortunately I failed to find the release tags on these URL:s, so I could check out (or rather export) the sources for Lazarus and Fpc. The closest I have come for Lazarus is here: https://gitlab.com/freepascal.org/lazarus/lazarus/-/tags But if I try something like svn export https://gitlab.com/freepascal.org/lazarus/lazarus/-/tags/main-2_3 2.3 it fails with an error: E160013: '/freepascal.org/lazarus/lazarus/-/tags/main-2_3' path not found I have read this too, to no avail: https://wiki.lazarus.freepascal.org/Getting_Lazarus#Getting_Lazarus_from_the_GitLab_server I want to retrieve the sources of a specific release tagged version, not some bleeding edge fixes work in progress version. Can someone please tell me where the *release tagged* versions are hidden? Surely there must be a git URL one can use with svn to get a specific tagged source release? And I do not want to clone the complete Lazarus repository... I have not used GIT ever, but Subversion for many years. -- Bo Berglund Developer in Sweden From kadissov.e at gmail.com Mon Nov 22 06:57:51 2021 From: kadissov.e at gmail.com (=?UTF-8?B?0JXQstCz0LXQvdC40Lkg0JrQsNC00LjRgdC+0LI=?=) Date: Mon, 22 Nov 2021 08:57:51 +0300 Subject: [Lazarus] Asteroids in Pascal In-Reply-To: References: Message-ID: Hi. My operating system is kubuntu 21.04. How can I execute system commands from my graphical lazarus program? вс, 21 нояб. 2021 г. в 14:18, Graeme Geldenhuys via lazarus < lazarus at lists.lazarus-ide.org>: > On 2021-11-09 6:32 p.m., Anthony Walter via lazarus wrote: > > I've included a copy of the entire game logic code. Check it out here: > > Such a cool game. :-D Thank you for sharing. > > Regards, > Graeme > > -- > _______________________________________________ > lazarus mailing list > lazarus at lists.lazarus-ide.org > https://lists.lazarus-ide.org/listinfo/lazarus > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bo.berglund at gmail.com Mon Nov 22 14:47:17 2021 From: bo.berglund at gmail.com (Bo Berglund) Date: Mon, 22 Nov 2021 14:47:17 +0100 Subject: [Lazarus] Asteroids in Pascal References: Message-ID: On Mon, 22 Nov 2021 08:57:51 +0300, ??????? ??????? via lazarus wrote: >Hi. >My operating system is kubuntu 21.04. How can I execute system commands >from my graphical lazarus program? > Example: RunCommandIndir(exedir, executable, arguments, returnstr, [poWaitOnExit,poStderrToOutPut,poNoConsole]); Where: exedir = the directory where you want the execution to happen executable = the program executable file arguments = array of string holding the command line arguments returnstr = String getting the return message from the executable Read more by searching for RunCommandIndir and/or RunCommand in the fpc documentation. -- Bo Berglund Developer in Sweden From bartjunk64 at gmail.com Mon Nov 22 18:49:27 2021 From: bartjunk64 at gmail.com (Bart) Date: Mon, 22 Nov 2021 18:49:27 +0100 Subject: [Lazarus] DCPcrypt: a package looking for a new maintainer Message-ID: Hi, The DCPcrypt package (see: https://wiki.lazarus.freepascal.org/DCPcrypt) does not have a maintainer anymore. Graeme unfortunately had to give up (as he pointed out: not by choice, but by circumstances). Is there anybody out there who is interested (and feels capable) in maintaining that package? -- Bart From michael at freepascal.org Mon Nov 22 19:00:09 2021 From: michael at freepascal.org (Michael Van Canneyt) Date: Mon, 22 Nov 2021 19:00:09 +0100 (CET) Subject: [Lazarus] DCPcrypt: a package looking for a new maintainer In-Reply-To: References: Message-ID: On Mon, 22 Nov 2021, Bart via lazarus wrote: > Hi, > > The DCPcrypt package (see: > https://wiki.lazarus.freepascal.org/DCPcrypt) does not have a > maintainer anymore. > Graeme unfortunately had to give up (as he pointed out: not by choice, > but by circumstances). > > Is there anybody out there who is interested (and feels capable) in > maintaining that package? I think it is a mature codebase, maybe it should be incorporated in FPC. I am currently implementing crypto routines in FPC for use in JWT tokens, so maybe using DPCrypt is a better approach than re-implementing all routines, if we can change the license. Michael. From bo.berglund at gmail.com Mon Nov 22 22:36:22 2021 From: bo.berglund at gmail.com (Bo Berglund) Date: Mon, 22 Nov 2021 22:36:22 +0100 Subject: [Lazarus] Just installed fpc/lazarus from sources on Ubuntu 20, cannot find desktop file Message-ID: I have successfully built Lazarus 2.0.12 with fpc 3.2.2 on an Ubuntu 20.04.3 machine running the Cinnamon desktop. I have noted this problem: The desktop file is not recognized by Ubuntu so it shows in the main menu. I have created it here: $HOME/.local/share/applications/lazarus_2.0.12.desktop If I copy the desktop file to $HOME/Desktop then it appears on the screen and I can start it. But I want it on the menu.... The content is this (newsreader wraps long lines so Exec= is wrapped): [Desktop Entry] Comment=Lazarus IDE 2.0.12 Terminal=false Name=Lazarus 2.0.12 Exec=/home/bosse/devel/lazarus/2.0.12/startlazarus --pcp=/home/bosse/.lazarus_2.0.12 %f Type=Application Icon=/home/bosse/devel/lazarus/2.0.12/images/ide_icon48x48.png Categories=Application;IDE;Development;GTK;GUIDesigner;Programming; NoDisplay=false Keywords=editor;Pascal;IDE;FreePascal;fpc;Design;Designer; Does Ubuntu with Cinnamon place the files in another location? -- Bo Berglund Developer in Sweden From m.e.sanliturk at gmail.com Mon Nov 22 22:45:05 2021 From: m.e.sanliturk at gmail.com (Mehmet Erol Sanliturk) Date: Tue, 23 Nov 2021 00:45:05 +0300 Subject: [Lazarus] Just installed fpc/lazarus from sources on Ubuntu 20, cannot find desktop file In-Reply-To: References: Message-ID: Please search the following phrase in Google : adding an entry into cinnamon main menu For example : https://askubuntu.com/questions/232053/how-to-add-a-shortcut-to-a-command-to-the-cinnamon-menu How to add a shortcut to a command to the Cinnamon menu? and some of the other search results . With my best regards , Mehmet Erol Sanliturk On Tue, Nov 23, 2021 at 12:36 AM Bo Berglund via lazarus < lazarus at lists.lazarus-ide.org> wrote: > I have successfully built Lazarus 2.0.12 with fpc 3.2.2 on an Ubuntu > 20.04.3 > machine running the Cinnamon desktop. > > I have noted this problem: > > The desktop file is not recognized by Ubuntu so it shows in the main menu. > I have created it here: > $HOME/.local/share/applications/lazarus_2.0.12.desktop > > If I copy the desktop file to $HOME/Desktop then it appears on the screen > and I > can start it. > But I want it on the menu.... > > The content is this (newsreader wraps long lines so Exec= is wrapped): > > [Desktop Entry] > Comment=Lazarus IDE 2.0.12 > Terminal=false > Name=Lazarus 2.0.12 > Exec=/home/bosse/devel/lazarus/2.0.12/startlazarus > --pcp=/home/bosse/.lazarus_2.0.12 %f > Type=Application > Icon=/home/bosse/devel/lazarus/2.0.12/images/ide_icon48x48.png > Categories=Application;IDE;Development;GTK;GUIDesigner;Programming; > NoDisplay=false > Keywords=editor;Pascal;IDE;FreePascal;fpc;Design;Designer; > > Does Ubuntu with Cinnamon place the files in another location? > > -- > Bo Berglund > Developer in Sweden > > -- > _______________________________________________ > lazarus mailing list > lazarus at lists.lazarus-ide.org > https://lists.lazarus-ide.org/listinfo/lazarus > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bo.berglund at gmail.com Mon Nov 22 23:59:47 2021 From: bo.berglund at gmail.com (Bo Berglund) Date: Mon, 22 Nov 2021 23:59:47 +0100 Subject: [Lazarus] Just installed fpc/lazarus from sources on Ubuntu 20, cannot find desktop file References: Message-ID: On Tue, 23 Nov 2021 00:45:05 +0300, Mehmet Erol Sanliturk via lazarus wrote: >Please search the following phrase in Google : > >adding an entry into cinnamon main menu > OK, I have installed Lazarus on many systems before and all of these (both Raspberry Pi and PC Linux had the user desktop files located where I put this one, i.e. inside $HOME. Apparently not so with Ubuntu Cinnamon.... Copied it over to /usr/share/applications/ and then it worked as expected. -- Bo Berglund Developer in Sweden From bo.berglund at gmail.com Tue Nov 23 11:12:42 2021 From: bo.berglund at gmail.com (Bo Berglund) Date: Tue, 23 Nov 2021 11:12:42 +0100 Subject: [Lazarus] New install on Ubuntu 20.04.3 Cinnamon - Errors when recompiling IDE Message-ID: I have installed Lazarus 2.0.12 and FPC 3.2.2 from sources retrieved from GitLab on a new Linux Ubuntu 20.04.3 LTS with the Cinnamon desktop environment. After starting Lazarus I have used OLPM to add a number of packages I always use in my Lazarus setups. But when doing the install and ending with the Lazarus rebuild it exits with the following error messages: lazarus.pp(162,3) Note: Call to subroutine "function GetDebugger:TLazLogger;" marked inline is not inlined lazarus.pp(166,1) Error: resource compiler "fpres" not found, switching to external mode Same thing now happens if I exit Lazarus and start it again and then go to Tools/Build_Lazarus_with_Profile:_Normal_IDE The lazarus.pp file is opened at this point, a file I have never touched. First time I started Lazarus I only went to OnLinePackageManager in order to install my customary extra packages... What can cause this and how do I solve it? -- Bo Berglund Developer in Sweden From luca at wetron.es Tue Nov 23 11:55:08 2021 From: luca at wetron.es (Luca Olivetti) Date: Tue, 23 Nov 2021 11:55:08 +0100 Subject: [Lazarus] New install on Ubuntu 20.04.3 Cinnamon - Errors when recompiling IDE In-Reply-To: References: Message-ID: <0dfa9f05-a23e-f19a-668c-9dd5f757aa7a@wetron.es> El 23/11/21 a les 11:12, Bo Berglund via lazarus ha escrit: > > What can cause this and how do I solve it? Did you try a "make all" or "make bigide" from the lazarus source directory (so it will build all its tools)? Bye -- Luca Olivetti Wetron Automation Technology http://www.wetron.es/ Tel. +34 93 5883004 (Ext.3010) Fax +34 93 5883007 From bo.berglund at gmail.com Tue Nov 23 11:55:11 2021 From: bo.berglund at gmail.com (Bo Berglund) Date: Tue, 23 Nov 2021 11:55:11 +0100 Subject: [Lazarus] New install on Ubuntu 20.04.3 Cinnamon - Errors when recompiling IDE References: Message-ID: On Tue, 23 Nov 2021 11:12:42 +0100, Bo Berglund via lazarus wrote: >I have installed Lazarus 2.0.12 and FPC 3.2.2 from sources retrieved from GitLab >on a new Linux Ubuntu 20.04.3 LTS with the Cinnamon desktop environment. > >After starting Lazarus I have used OLPM to add a number of packages I always use >in my Lazarus setups. >But when doing the install and ending with the Lazarus rebuild it exits with the >following error messages: > >lazarus.pp(162,3) Note: Call to subroutine "function GetDebugger:TLazLogger;" >marked inline is not inlined >lazarus.pp(166,1) Error: resource compiler "fpcres" not found, switching to >external mode > Turns out that I was hit by the *same* problem 18 months ago and I got a solution then right here from Mattias Gaertner... Look at the thread starting On Sun, 24 May 2020 22:21:31 +0200 titled: Lazarus on Ubuntu 18.04.4 via VNC cannot find utilities https://lists.lazarus-ide.org/pipermail/lazarus/2020-May/238019.html But unlike that time VNC is *not* involved at all since I am now working inside a VMWare virtual macine with direct access to the desktop. Still the same problem occurs. And the solution also works. Right now I have decided to document all details of FPC/Lazarus installation from sources on Linux since the move to GitLab disrupted all of my instrall scripts. This "detail" has now entered my notes as well so it will be the last time I bother you with this. -- Bo Berglund Developer in Sweden From juha.manninen62 at gmail.com Tue Nov 23 16:03:10 2021 From: juha.manninen62 at gmail.com (Juha Manninen) Date: Tue, 23 Nov 2021 17:03:10 +0200 Subject: [Lazarus] New install on Ubuntu 20.04.3 Cinnamon - Errors when recompiling IDE In-Reply-To: References: Message-ID: A clean build usually solves such problems. Juha -------------- next part -------------- An HTML attachment was scrubbed... URL: From sysrpl at gmail.com Tue Nov 23 23:00:40 2021 From: sysrpl at gmail.com (Anthony Walter) Date: Tue, 23 Nov 2021 17:00:40 -0500 Subject: [Lazarus] Vector Based UI Supports Any Transform Message-ID: I've been busy with family ongoings the past week but managed to squeeze in a small quality of life improvement to my vector graphics toolkit with UI widgets and SVG parsing and rendering support. https://streamable.com/cv137g Above is a link to a quickly recorded video demonstrating UI widgets supporting any type of transform, while maintaining crisp and smooth vector edges. Note that even when transformed, UI widgets properly map mouse input coordinates, both for mouse clicking and mouse dragging. -------------- next part -------------- An HTML attachment was scrubbed... URL: From bo.berglund at gmail.com Tue Nov 23 23:12:39 2021 From: bo.berglund at gmail.com (Bo Berglund) Date: Tue, 23 Nov 2021 23:12:39 +0100 Subject: [Lazarus] New install on Ubuntu 20.04.3 Cinnamon - Errors when recompiling IDE References: Message-ID: <40nqpglmml0mvhem7t4dcs7q8m1gpavfh9@4ax.com> On Tue, 23 Nov 2021 17:03:10 +0200, Juha Manninen via lazarus wrote: >A clean build usually solves such problems. > >Juha Not really.... The problem was that in certain cases of Linux (Ubuntu?) the desktop file execution does not correctly pick up the $HOME/bin folder in path and that is where the binaries wind up. Michel had the same problem and found this solution. (I should have quoted the actual solution in my last message rather than referencing the old thread... So I am doing it now below.) The normal Exec line in the desktop file looks like this (on one single line): Exec=/home/user/devel/lazarus/2.0.12/startlazarus --pcp=/home/user/.lazarus_2.0.12 %f And the modified line like this: Exec=/bin/bash -l -c '/home/user/devel/lazarus/2.0.12/startlazarus --pcp=/home/user/.lazarus_2.0.12' The first results in Lazarus *not* finding the binaries it needs, whereas the second makes sure to load the correct path into the session. This will not be affected by any form of build. Notice that when fpc and lazarus are built it is in a terminal session started by user and given the full path including to $HOME/bin So the standalone build process works whereas the lazarus session started from the Ubuntu menu using the desktop file only works with Michel's modifications. I can confirm that the solution back in 2020 which worked then still works in this new environment today. -- Bo Berglund Developer in Sweden From bo.berglund at gmail.com Tue Nov 23 23:15:10 2021 From: bo.berglund at gmail.com (Bo Berglund) Date: Tue, 23 Nov 2021 23:15:10 +0100 Subject: [Lazarus] New install on Ubuntu 20.04.3 Cinnamon - Errors when recompiling IDE References: <40nqpglmml0mvhem7t4dcs7q8m1gpavfh9@4ax.com> Message-ID: On Tue, 23 Nov 2021 23:12:39 +0100, Bo Berglund via lazarus wrote: >Michel had the same problem and found this solution. >(I should have quoted the actual solution in my last message rather than >referencing the old thread... So I am doing it now below.) SORRY! TYPO... I meant Mattias Gaertner as the one who had the same problem and solved it! -- Bo Berglund Developer in Sweden From bo.berglund at gmail.com Tue Nov 23 23:22:38 2021 From: bo.berglund at gmail.com (Bo Berglund) Date: Tue, 23 Nov 2021 23:22:38 +0100 Subject: [Lazarus] New install on Ubuntu 20.04.3 Cinnamon - Errors when recompiling IDE References: <40nqpglmml0mvhem7t4dcs7q8m1gpavfh9@4ax.com> Message-ID: <89qqpgduvnokbdgqtru06el91jtubtn39o@4ax.com> On Tue, 23 Nov 2021 23:15:10 +0100, Bo Berglund via lazarus wrote: >On Tue, 23 Nov 2021 23:12:39 +0100, Bo Berglund via lazarus > wrote: > >>Michel had the same problem and found this solution. >>(I should have quoted the actual solution in my last message rather than >>referencing the old thread... So I am doing it now below.) > >SORRY! TYPO... >I meant Mattias Gaertner as the one who had the same problem and solved it! > Again too fast typing, it *WAS* Michael Van Canneyt who came up with the solution! See here: https://lists.lazarus-ide.org/pipermail/lazarus/2020-May/238022.html Please disregard previous message!! -- Bo Berglund Developer in Sweden From m.e.sanliturk at gmail.com Wed Nov 24 02:42:07 2021 From: m.e.sanliturk at gmail.com (Mehmet Erol Sanliturk) Date: Wed, 24 Nov 2021 04:42:07 +0300 Subject: [Lazarus] Vector Based UI Supports Any Transform In-Reply-To: References: Message-ID: To play your video , the computer is displaying a message about a missing codec without mentioning which codec name . Perhaps , the video in Youtube similar to your previous video with respect to codec or video format , will be playable . Mehmet Erol Sanliturk On Wed, Nov 24, 2021 at 1:01 AM Anthony Walter via lazarus < lazarus at lists.lazarus-ide.org> wrote: > I've been busy with family ongoings the past week but managed to squeeze > in a small quality of life improvement to my vector graphics toolkit with > UI widgets and SVG parsing and rendering support. > > https://streamable.com/cv137g > > Above is a link to a quickly recorded video demonstrating UI widgets > supporting any type of transform, while maintaining crisp and smooth vector > edges. Note that even when transformed, UI widgets properly map mouse input > coordinates, both for mouse clicking and mouse dragging. > > > -- > _______________________________________________ > lazarus mailing list > lazarus at lists.lazarus-ide.org > https://lists.lazarus-ide.org/listinfo/lazarus > -------------- next part -------------- An HTML attachment was scrubbed... URL: From luca at wetron.es Wed Nov 24 13:41:21 2021 From: luca at wetron.es (Luca Olivetti) Date: Wed, 24 Nov 2021 13:41:21 +0100 Subject: [Lazarus] Debugger stops in c dll even when no breakpoint set In-Reply-To: References: <86f2f785-f96a-0202-3e46-a0a4d0ba5c3e@mfriebe.de> <06426d35-a8fc-280f-5021-3f142f713f48@wetron.es> <955d65e9-a5ef-3359-c830-5621b7492b45@wetron.es> Message-ID: El 3/11/21 a les 15:56, Luca Olivetti via lazarus ha escrit: A quick follow up: I used the wrong size when mallocing data (size of the pointer variable instead of the size of the struct it pointed to, d'oh!). I found it by running the program under windbg and there I saw a message saying that I wrote to a memory area beyond the 4 bytes allocated. I wondered why 4 bytes when my struct is bigger and then I found the stupid error https://github.com/olivluca/fpopen62541/commit/e5ec2cab8e97eeeba29e33b801de6e42a0084ca8 I don't know where that message came from, but is there a way to see it while debugging the application under lazarus? Bye > El 29/10/21 a les 12:48, Christo Crause ha escrit: >> >> On Fri, Oct 29, 2021 at 10:41 AM Luca Olivetti via lazarus >> > >> wrote: >> >> >>     I now tested under windows 10 64 bits (the exe is 32 bits, the >> previous >>     test was under windows 7 32 bits), and here instead of stopping >> once in >>     ntdll!RtlpNtMakeTemporaryKey it stops twice: in ntdll!RtlZeroHeap >>     and in >>     ntdll!RtlCaptureStackContext. >>     The former (RtlZeroHeap) shows what it seems a bogus call stack (i.e. >>     just two levels, the RtlZeroHeap itself and 00000000). >> >> >> Searching around seems to suggest that RtlpNtMakeTemporaryKey is >> typically part of a stack trace involving memory/stack corruption or >> freeing an invalid reference or already freed pointer.  See this >> example: >> https://stackoverflow.com/questions/45162248/calling-free-in-c-triggers-ntdlldbgbreakpoint-in-debug-but-crashes-in-rel/45247035 >> >> >> >> Since the code writes something to memory in the int3 branch, check >> errno to see if that reveals something. > > OK, I added a > >    printf("Error clear %d: %s\n", errno, strerror(errno)); > > after the call to free. > When run outside the debugger, it prints "Error clear 0: no error", when > run from lazarus "Error clear 22: Invalid argument". > > I then found this document > https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/free?view=msvc-160 > > it says that "when the application is linked with a debug version of the > C run-time libraries, free resolves to _free_dbg", but I don't think it > does that dynamically based on how the app is been called (directly or > through a debugger), or does it? > > In any case I checked the documentation for the "CRT Debug Heap" > > https://docs.microsoft.com/en-us/visualstudio/debugger/crt-debug-heap-details?view=vs-2019 > > > and the bytes surrounding my allocated data aren't the same as explained > in that article and they are the same before calling free as they were > after calling malloc. > > > Bye -- Luca Olivetti Wetron Automation Technology http://www.wetron.es/ Tel. +34 93 5883004 (Ext.3010) Fax +34 93 5883007 From lazarus at mfriebe.de Wed Nov 24 14:29:51 2021 From: lazarus at mfriebe.de (Martin Frb) Date: Wed, 24 Nov 2021 14:29:51 +0100 Subject: [Lazarus] Debugger stops in c dll even when no breakpoint set In-Reply-To: References: <86f2f785-f96a-0202-3e46-a0a4d0ba5c3e@mfriebe.de> <06426d35-a8fc-280f-5021-3f142f713f48@wetron.es> <955d65e9-a5ef-3359-c830-5621b7492b45@wetron.es> Message-ID: <959a7a67-0e17-3037-647a-569625443e9d@mfriebe.de> On 24/11/2021 13:41, Luca Olivetti via lazarus wrote: > El 3/11/21 a les 15:56, Luca Olivetti via lazarus ha escrit: > > A quick follow up: I used the wrong size when mallocing data (size of > the pointer variable instead of the size of the struct it pointed to, > d'oh!). > I found it by running the program under windbg and there I saw a > message saying that I wrote to a memory area beyond the 4 bytes > allocated. I wondered why 4 bytes when my struct is bigger and then I > found the stupid error > https://github.com/olivluca/fpopen62541/commit/e5ec2cab8e97eeeba29e33b801de6e42a0084ca8 > > I don't know where that message came from, but is there a way to see > it while debugging the application under lazarus? I would guess this is based on https://docs.microsoft.com/de-de/windows-hardware/drivers/debugger/gflags-and-pageheap Now there are 2 modes: "standard" and "full" Note: this is only about mem on the heap. Local vars on the stack are not affected (except, if (like objects) they are pointers to the heap, then the heap part (and only that) will be affected) "Standard" only detects, overruns when mem is freed. If I understand this correctly, in FPC you can enable -gh heaptrc, and this will do something similar, but limited... This is hardcoded in HeapTrc       { add a small footprint at the end of memory blocks, this         can check for memory overwrites at the end of a block }       add_tail : boolean = true;       tail_size : longint = sizeof(ptruint); Additionally https://www.freepascal.org/docs-html/rtl/heaptrc/keepreleased.html On Linux, you can also use valgrind memcheck => which is excellent at finding stuff like this. "Full" (if I read it correctly) will get a separate mem-page for every (m)alloc. As the doc says, that will strain your sys mem.... This want work with default FPC, because FPC does not use its own mem manager. Fpc gets a whole page, and splits it without windows knowing. So you need to see if there is an alternative mem manager that would work (maybe CMEM?). If there is a mem manager, that works with "FULL", then gdb and fpdebug should stop with an access violation. From luca at wetron.es Wed Nov 24 14:38:34 2021 From: luca at wetron.es (Luca Olivetti) Date: Wed, 24 Nov 2021 14:38:34 +0100 Subject: [Lazarus] Debugger stops in c dll even when no breakpoint set In-Reply-To: <959a7a67-0e17-3037-647a-569625443e9d@mfriebe.de> References: <86f2f785-f96a-0202-3e46-a0a4d0ba5c3e@mfriebe.de> <06426d35-a8fc-280f-5021-3f142f713f48@wetron.es> <955d65e9-a5ef-3359-c830-5621b7492b45@wetron.es> <959a7a67-0e17-3037-647a-569625443e9d@mfriebe.de> Message-ID: <93d58826-4f6a-5e09-93fb-875973b8c265@wetron.es> El 24/11/21 a les 14:29, Martin Frb via lazarus ha escrit: >> I don't know where that message came from, but is there a way to see >> it while debugging the application under lazarus? > > I would guess this is based on > https://docs.microsoft.com/de-de/windows-hardware/drivers/debugger/gflags-and-pageheap > > > Now there are 2 modes: "standard" and "full" > Note: this is only about mem on the heap. Local vars on the stack are > not affected (except, if (like objects) they are pointers to the heap, > then the heap part (and only that) will be affected) > > "Standard" only detects, overruns when mem is freed. > If I understand this correctly, in FPC you can enable -gh heaptrc, and > this will do something similar, but limited... Yes, I routinely do that, but it only works for pascal code. In this case it was a c dll (that I wrote as a bridge between another dll and my pascal code) so heaptrc wouldn't catch that error. I suppose the message comes from some windows core dll and windbg can display it, I don't know if and how gdb can (I'm not using fpdebug yet, maybe it can?). Bye -- Luca Olivetti Wetron Automation Technology http://www.wetron.es/ Tel. +34 93 5883004 (Ext.3010) Fax +34 93 5883007 From luca at wetron.es Wed Nov 24 14:43:56 2021 From: luca at wetron.es (Luca Olivetti) Date: Wed, 24 Nov 2021 14:43:56 +0100 Subject: [Lazarus] Debugger stops in c dll even when no breakpoint set In-Reply-To: <93d58826-4f6a-5e09-93fb-875973b8c265@wetron.es> References: <86f2f785-f96a-0202-3e46-a0a4d0ba5c3e@mfriebe.de> <06426d35-a8fc-280f-5021-3f142f713f48@wetron.es> <955d65e9-a5ef-3359-c830-5621b7492b45@wetron.es> <959a7a67-0e17-3037-647a-569625443e9d@mfriebe.de> <93d58826-4f6a-5e09-93fb-875973b8c265@wetron.es> Message-ID: El 24/11/21 a les 14:38, Luca Olivetti via lazarus ha escrit: > El 24/11/21 a les 14:29, Martin Frb via lazarus ha escrit: > >>> I don't know where that message came from, but is there a way to see >>> it while debugging the application under lazarus? >> >> I would guess this is based on >> https://docs.microsoft.com/de-de/windows-hardware/drivers/debugger/gflags-and-pageheap >> >> >> Now there are 2 modes: "standard" and "full" >> Note: this is only about mem on the heap. Local vars on the stack are >> not affected (except, if (like objects) they are pointers to the heap, >> then the heap part (and only that) will be affected) >> >> "Standard" only detects, overruns when mem is freed. >> If I understand this correctly, in FPC you can enable -gh heaptrc, and >> this will do something similar, but limited... > > Yes, I routinely do that, but it only works for pascal code. In this > case it was a c dll (that I wrote as a bridge between another dll and my > pascal code) so heaptrc wouldn't catch that error. > I suppose the message comes from some windows core dll and windbg can > display it, I don't know if and how gdb can (I'm not using fpdebug yet, > maybe it can?). btw, I'm not sure that gflags was doing anything: I was getting the same result with every flag activated as with none of them. In fact when I sent the first message in this thread I had no windows debugging tool installed, yet the debugger stopped on the free, only I couldn't see or find that message. Bye -- Luca Olivetti Wetron Automation Technology http://www.wetron.es/ Tel. +34 93 5883004 (Ext.3010) Fax +34 93 5883007 From luca at wetron.es Wed Nov 24 14:51:57 2021 From: luca at wetron.es (Luca Olivetti) Date: Wed, 24 Nov 2021 14:51:57 +0100 Subject: [Lazarus] Debugger stops in c dll even when no breakpoint set In-Reply-To: <93d58826-4f6a-5e09-93fb-875973b8c265@wetron.es> References: <86f2f785-f96a-0202-3e46-a0a4d0ba5c3e@mfriebe.de> <06426d35-a8fc-280f-5021-3f142f713f48@wetron.es> <955d65e9-a5ef-3359-c830-5621b7492b45@wetron.es> <959a7a67-0e17-3037-647a-569625443e9d@mfriebe.de> <93d58826-4f6a-5e09-93fb-875973b8c265@wetron.es> Message-ID: El 24/11/21 a les 14:38, Luca Olivetti via lazarus ha escrit: . > I suppose the message comes from some windows core dll and windbg can > display it, I don't know if and how gdb can (I'm not using fpdebug yet, > maybe it can?). Well, call me stupid: the message is perfectly visible in the "Event Log" window. Bye -- Luca Olivetti Wetron Automation Technology http://www.wetron.es/ Tel. +34 93 5883004 (Ext.3010) Fax +34 93 5883007 From luca at wetron.es Fri Nov 26 13:15:07 2021 From: luca at wetron.es (Luca Olivetti) Date: Fri, 26 Nov 2021 13:15:07 +0100 Subject: [Lazarus] Application.QueueAsyncCall and "conversion between ordinals and pointers is not portable" Message-ID: Hello, Application.QueueAsyncCall is defined as procedure Application.QueueAsyncCall(const AMethod:TDataEvent; Data: PtrInt); When I want to pass a string or a big structure as "Data", I create a pointer and use that, casting it as PtrInt, then I use and free it in the Async Method., e.g. procedure TServerThread.Log(const msg:string); var s: PString; begin new(s); s^:=msg; Application.QueueAsyncCall(@MainForm.LogServer, ptrint(s)); end; procedure TMainForm.LogServer(data: ptrint); var s:PString; begin ptruint(s):=data; //ptrint here gives a warning "use an unsigned type" LogMemo.Lines.Add(s^); Dispose(s); end; But that gives a hint "conversion between ordinals and pointers is not portable". The suggestion I found is to use {%H-} to silence that hint (which I did), but is there a better way? Why Data is defined as PtrInt and not pointer? Bye -- Luca Olivetti Wetron Automation Technology http://www.wetron.es/ Tel. +34 93 5883004 (Ext.3010) Fax +34 93 5883007 From juha.manninen62 at gmail.com Mon Nov 29 10:52:39 2021 From: juha.manninen62 at gmail.com (Juha Manninen) Date: Mon, 29 Nov 2021 11:52:39 +0200 Subject: [Lazarus] TFrame improvements Message-ID: Please everybody test issue: https://gitlab.com/freepascal.org/lazarus/lazarus/-/issues/25124 Some components caused an error when placed on a Frame. Now it apparently works. Can somebody please explain why it works. (See my comment there). There are also improvements for a custom Frame installed as a component in the palette. See: https://gitlab.com/freepascal.org/lazarus/lazarus/-/issues/39488 The improvements will be merged to 2.2. Regards, Juha -------------- next part -------------- An HTML attachment was scrubbed... URL: From lazarus at mfriebe.de Mon Nov 29 11:32:08 2021 From: lazarus at mfriebe.de (Martin Frb) Date: Mon, 29 Nov 2021 11:32:08 +0100 Subject: [Lazarus] TFrame improvements In-Reply-To: References: Message-ID: <7b008d31-eda9-e3f9-555b-f59486101351@mfriebe.de> On 29/11/2021 10:52, Juha Manninen via lazarus wrote: > Please everybody test issue: > https://gitlab.com/freepascal.org/lazarus/lazarus/-/issues/25124 > Some components caused an error when placed on a Frame. Now it > apparently works. > Can somebody please explain why it works. (See my comment there). > From reading the issue, and a peak at the code: - When the frame is read from stream, the property is triggered, as it should (and as on a Form. - The property accesses "canvas" => that triggers asking for a handle (which is created based on CreateParams) A form does not need a parent (it can have one, if it is embedded). Therefore CreateParam for TForm checks this and removes flags such as WS_CHILD (not sure if WS_TABSTOP would cause an issue, but it makes no sense...) A frame, at least at design time, can display without parent too. (I guess: it acts as if it is a TForm in that case). => So for that IMHO your patch is correct (for design time). Yet a TFrame at runtime IMHO should always have a parent. No idea, if there is other code, that relies on that.... So maybe your patch should be extended, to only do that, if the control is in "designtime" state? Though, not sure if it is worth it. While it would be correct to fail at runtime if there is no parent, it would not bring any benefit. If other code in TFrame needs the parent, then it will fail in the other code, if not then it will work. The question is, do we commit to it may work, and then maybe have to fix more later? Otherwise it may want to even throw an exception, if it does not have a parent at runtime? From michael at freepascal.org Mon Nov 29 11:36:37 2021 From: michael at freepascal.org (Michael Van Canneyt) Date: Mon, 29 Nov 2021 11:36:37 +0100 (CET) Subject: [Lazarus] TFrame improvements In-Reply-To: <7b008d31-eda9-e3f9-555b-f59486101351@mfriebe.de> References: <7b008d31-eda9-e3f9-555b-f59486101351@mfriebe.de> Message-ID: On Mon, 29 Nov 2021, Martin Frb via lazarus wrote: > On 29/11/2021 10:52, Juha Manninen via lazarus wrote: >> Please everybody test issue: >> https://gitlab.com/freepascal.org/lazarus/lazarus/-/issues/25124 >> Some components caused an error when placed on a Frame. Now it >> apparently works. >> Can somebody please explain why it works. (See my comment there). >> > > From reading the issue, and a peak at the code: > > - When the frame is read from stream, the property is triggered, as it > should (and as on a Form. > - The property accesses "canvas" => that triggers asking for a handle > (which is created based on CreateParams) > > A form does not need a parent (it can have one, if it is embedded). > Therefore CreateParam for TForm checks this and removes flags such as > WS_CHILD (not sure if WS_TABSTOP would cause an issue, but it makes no > sense...) > > A frame, at least at design time, can display without parent too. (I > guess: it acts as if it is a TForm in that case). > => So for that IMHO your patch is correct (for design time). > > Yet a TFrame at runtime IMHO should always have a parent. > No idea, if there is other code, that relies on that.... > So maybe your patch should be extended, to only do that, if the control > is in "designtime" state? > Though, not sure if it is worth it. While it would be correct to fail at > runtime if there is no parent, it would not bring any benefit. If other > code in TFrame needs the parent, then it will fail in the other code, if > not then it will work. > The question is, do we commit to it may work, and then maybe have to fix > more later? Otherwise it may want to even throw an exception, if it does > not have a parent at runtime? I often create a frame in code (so no parent) which is then placed on a form. Will this scenario still work ? Michael. From juha.manninen62 at gmail.com Mon Nov 29 11:50:28 2021 From: juha.manninen62 at gmail.com (Juha Manninen) Date: Mon, 29 Nov 2021 12:50:28 +0200 Subject: [Lazarus] TFrame improvements In-Reply-To: References: <7b008d31-eda9-e3f9-555b-f59486101351@mfriebe.de> Message-ID: On Mon, Nov 29, 2021 at 12:36 PM Michael Van Canneyt via lazarus < lazarus at lists.lazarus-ide.org> wrote: > > On Mon, 29 Nov 2021, Martin Frb via lazarus wrote: > > - The property accesses "canvas" => that triggers asking for a handle > > (which is created based on CreateParams) > Ah yes, Canvas. TStringGrid also uses Canvas a lot, but apparently not in a property setter. I often create a frame in code (so no parent) which is then placed on a > form. > Will this scenario still work ? > Yes, after my fix it still works. It is better *not* to add other artificial restrictions. They would bring no benefit as Martin noted. Juha -------------- next part -------------- An HTML attachment was scrubbed... URL: From michael at freepascal.org Mon Nov 29 12:05:13 2021 From: michael at freepascal.org (Michael Van Canneyt) Date: Mon, 29 Nov 2021 12:05:13 +0100 (CET) Subject: [Lazarus] TFrame improvements In-Reply-To: References: <7b008d31-eda9-e3f9-555b-f59486101351@mfriebe.de> Message-ID: On Mon, 29 Nov 2021, Juha Manninen via lazarus wrote: > On Mon, Nov 29, 2021 at 12:36 PM Michael Van Canneyt via lazarus < > lazarus at lists.lazarus-ide.org> wrote: > >> >> On Mon, 29 Nov 2021, Martin Frb via lazarus wrote: >>> - The property accesses "canvas" => that triggers asking for a handle >>> (which is created based on CreateParams) >> > > Ah yes, Canvas. > TStringGrid also uses Canvas a lot, but apparently not in a property setter. > > > I often create a frame in code (so no parent) which is then placed on a >> form. >> Will this scenario still work ? >> > > Yes, after my fix it still works. > It is better *not* to add other artificial restrictions. They would bring > no benefit as Martin noted. What do you mean 'artificial restrictions' ? The above is quite standard. Michael. From lazarus at mfriebe.de Mon Nov 29 12:05:37 2021 From: lazarus at mfriebe.de (Martin Frb) Date: Mon, 29 Nov 2021 12:05:37 +0100 Subject: [Lazarus] TFrame improvements In-Reply-To: References: <7b008d31-eda9-e3f9-555b-f59486101351@mfriebe.de> Message-ID: <09260048-b05b-fdd4-ce41-abb4df24509e@mfriebe.de> On 29/11/2021 11:36, Michael Van Canneyt wrote: > > > On Mon, 29 Nov 2021, Martin Frb via lazarus wrote: > >> On 29/11/2021 10:52, Juha Manninen via lazarus wrote: >>> Please everybody test issue: >>> https://gitlab.com/freepascal.org/lazarus/lazarus/-/issues/25124 >>> Some components caused an error when placed on a Frame. Now it >>> apparently works. >>> Can somebody please explain why it works. (See my comment there). >>> >> >> From reading the issue, and a peak at the code: >> >> - When the frame is read from stream, the property is triggered, as >> it should (and as on a Form. >> - The property accesses "canvas" => that triggers asking for a handle >> (which is created based on CreateParams) >> >> A form does not need a parent (it can have one, if it is embedded). >> Therefore CreateParam for TForm checks this and removes flags such as >> WS_CHILD (not sure if WS_TABSTOP would cause an issue, but it makes >> no sense...) >> >> A frame, at least at design time, can display without parent too. (I >> guess: it acts as if it is a TForm in that case). >> => So for that IMHO your patch is correct (for design time). >> >> Yet a TFrame at runtime IMHO should always have a parent. >> No idea, if there is other code, that relies on that.... >> So maybe your patch should be extended, to only do that, if the >> control is in "designtime" state? >> Though, not sure if it is worth it. While it would be correct to fail >> at runtime if there is no parent, it would not bring any benefit. If >> other code in TFrame needs the parent, then it will fail in the other >> code, if not then it will work. >> The question is, do we commit to it may work, and then maybe have to >> fix more later? Otherwise it may want to even throw an exception, if >> it does not have a parent at runtime? > > I often create a frame in code (so no parent) which is then placed on > a form. > > Will this scenario still work ? Well, if your code works now, then apparently it does not access the handle/canvas before setting a parent? Which also means, you do not "show" the frame, before it has a parent. 1) With Juha's current patch: Yes. => Afaik this adds no restrictions. => Except, if you are waiting for an Exception, because you expect it to fail. ;) 2) If we add a "if designtime" around Juhas code, still nothing changes for your code. Since then runtime behaviour would be exactly as it currently is. 3) If we add    If (not designtime) and (ParentWindow = nil) then raise Exception(); afaik still nothing changes (except for the error message). Because currently, without Parent/ParentWindow it will fail to create the Handle (Actually, may need to be tested for all WidgetSets). If your code creates a Frame that during its creation (reading from lfm, or calls by other code) triggers any component to access the canvas, or otherwise needing a handle, then your code would fail already (without Juha's Patch). With the current Patch, such an "canvas" access would create a handle (it might not make it visible, but it could even do that). If that handle is created, and you set a Parent, then the handle would have to be discarded. So unless a frame should be able to be visible shown at runtime as if it was a Form of itself, any handle created without parent is created to be discarded again. Such a handle would only serve the purpose to allow incorrect code to "get away" (I.e. to draw text on an invisible canvas, that will never become visible). Question is: - Should that be allowed? - Should components access the canvas in "csLoading", or "if not HandleCreated"  (unless they indent for the Handle to be created at that time, and therefore are aware if that is possible) From lazarus at mfriebe.de Mon Nov 29 12:09:02 2021 From: lazarus at mfriebe.de (Martin Frb) Date: Mon, 29 Nov 2021 12:09:02 +0100 Subject: [Lazarus] TFrame improvements In-Reply-To: References: <7b008d31-eda9-e3f9-555b-f59486101351@mfriebe.de> Message-ID: On 29/11/2021 12:05, Michael Van Canneyt via lazarus wrote: > > What do you mean 'artificial restrictions' ?  The above is quite > standard. IMHO  "if csLoading" tests are also "quite standard" "If HandleCreated" exist too, not sure how widespread.... "accessing canvas"  outside paint, is discouraged. Though other uses of the "Handle" may exist outside paint. From lazarus at kluug.net Mon Nov 29 12:31:54 2021 From: lazarus at kluug.net (Ondrej Pokorny) Date: Mon, 29 Nov 2021 12:31:54 +0100 Subject: [Lazarus] TFrame improvements In-Reply-To: <7b008d31-eda9-e3f9-555b-f59486101351@mfriebe.de> References: <7b008d31-eda9-e3f9-555b-f59486101351@mfriebe.de> Message-ID: <8b0b8de4-2d50-f391-764c-9303c61fae9d@kluug.net> On 29.11.2021 11:32, Martin Frb via lazarus wrote: > On 29/11/2021 10:52, Juha Manninen via lazarus wrote: >> Please everybody test issue: >> https://gitlab.com/freepascal.org/lazarus/lazarus/-/issues/25124 >> Some components caused an error when placed on a Frame. Now it >> apparently works. >> Can somebody please explain why it works. (See my comment there). >> > > So maybe your patch should be extended, to only do that, if the > control is in "designtime" state? Yes, definitely add a condition to check the designtime state. There are many scenarios when the Canvas cannot be accessed and it is a common mistake to access it when not allowed. I didn't study the issue further but to me it looks strange that setting some parameters in CreateParams helps with it. Juha, your commit description "Somehow fixes issue ..." doesn't help to understand your change either. So I would encourage the component author to rewrite his code. Ondrej From michael at freepascal.org Mon Nov 29 12:32:46 2021 From: michael at freepascal.org (Michael Van Canneyt) Date: Mon, 29 Nov 2021 12:32:46 +0100 (CET) Subject: [Lazarus] TFrame improvements In-Reply-To: References: <7b008d31-eda9-e3f9-555b-f59486101351@mfriebe.de> Message-ID: On Mon, 29 Nov 2021, Martin Frb via lazarus wrote: > On 29/11/2021 12:05, Michael Van Canneyt via lazarus wrote: >> >> What do you mean 'artificial restrictions' ?  The above is quite >> standard. > > IMHO  "if csLoading" tests are also "quite standard" > > "If HandleCreated" exist too, not sure how widespread.... > > "accessing canvas"  outside paint, is discouraged. Well, as I understood it, painting code will not work on Mac outside the paint event, so only using canvas inside paint should be standard ? Reading is of course possible, I suppose. Michael. From lazarus at kluug.net Mon Nov 29 12:38:46 2021 From: lazarus at kluug.net (Ondrej Pokorny) Date: Mon, 29 Nov 2021 12:38:46 +0100 Subject: [Lazarus] TFrame improvements In-Reply-To: References: <7b008d31-eda9-e3f9-555b-f59486101351@mfriebe.de> Message-ID: <7ef68f31-298c-64dd-dacf-088746e23803@kluug.net> On 29.11.2021 12:32, Michael Van Canneyt via lazarus wrote: > On Mon, 29 Nov 2021, Martin Frb via lazarus wrote: >> On 29/11/2021 12:05, Michael Van Canneyt via lazarus wrote: >>> >>> What do you mean 'artificial restrictions' ?  The above is quite >>> standard. >> >> IMHO  "if csLoading" tests are also "quite standard" >> >> "If HandleCreated" exist too, not sure how widespread.... >> >> "accessing canvas"  outside paint, is discouraged. > > Well, as I understood it, painting code will not work on Mac outside the > paint event, so only using canvas inside paint should be standard ? You can still use the Canvas outside Paint for measuring. But not for painting. Painting outside Paint on Windows it is problematic as well. The "use the Canvas outside Paint for measuring" is valid of course only as long as Canvas is there or can be created - and it can be created when the handle is created or can be created. And a (normal) control's handle can be created only when a parent is set. That is the problem - the code tries to access canvas when the control's handle cannot be created. Ondrej From lazarus at mfriebe.de Mon Nov 29 13:23:28 2021 From: lazarus at mfriebe.de (Martin Frb) Date: Mon, 29 Nov 2021 13:23:28 +0100 Subject: [Lazarus] TFrame improvements In-Reply-To: <8b0b8de4-2d50-f391-764c-9303c61fae9d@kluug.net> References: <7b008d31-eda9-e3f9-555b-f59486101351@mfriebe.de> <8b0b8de4-2d50-f391-764c-9303c61fae9d@kluug.net> Message-ID: <18c171da-8218-779b-4b67-15e15e305654@mfriebe.de> On 29/11/2021 12:31, Ondrej Pokorny via lazarus wrote: > I didn't study the issue further but to me it looks strange that > setting some parameters in CreateParams helps with it. Juha, your > commit description "Somehow fixes issue ..." doesn't help to > understand your change either. "Setting" is actually "removing" => removing "WS_Child" allows the frame to be created as a top-level window. So before this, while the frame was created (and did not have a parent), that "buggy component" accessed the canvas. => Handle creation failed. => Now handle creation works. (note, that the handle is probably never "shown" , set to visible=true) So that is why the patch "works" Actually, come to think of it, maybe it be different. => it just allows a temporary handle (that will be thrown away without ever being visible), only to support buggy code, and that should not happen.... Yet: - Afaik/IIRC if read from stream as part of a form in runtime => the parent is already set (the form).   So at runtime such buggy code would work - If indeed so, the IDE would have to make sure, that the "designer" is already set as a parent, when reading the stream. Well, that is: I guess, when the frame is show stand alone in the IDE it has the designer as parent (not verified, but must have something, as it can be shown -- and until now it could not be shown as top level window). Then again, setting the designer as parent for reading the stream, may not be trivial at all. In which case we may go with the "dummy handle" but for designtime only. From juha.manninen62 at gmail.com Mon Nov 29 17:18:46 2021 From: juha.manninen62 at gmail.com (Juha Manninen) Date: Mon, 29 Nov 2021 18:18:46 +0200 Subject: [Lazarus] TFrame improvements In-Reply-To: <8b0b8de4-2d50-f391-764c-9303c61fae9d@kluug.net> References: <7b008d31-eda9-e3f9-555b-f59486101351@mfriebe.de> <8b0b8de4-2d50-f391-764c-9303c61fae9d@kluug.net> Message-ID: On Mon, Nov 29, 2021 at 1:32 PM Ondrej Pokorny via lazarus < lazarus at lists.lazarus-ide.org> wrote: > There are many scenarios when the Canvas cannot be accessed and it is a > common mistake to access it when not allowed. > > I didn't study the issue further but to me it looks strange that setting > some parameters in CreateParams helps with it. Juha, your commit > description "Somehow fixes issue ..." doesn't help to understand your > change either. > The commit message is not perfect but the committed code is, now that I fully understand the issue. CreateParams for Frame now follows the same logic as CreateParams for Form. It allows a Frame to stand without a parent in the designer or even at runtime in some hypothetical situation(?). Using Canvas outside Paint may not be recommended but it can be done in some widgetsets. The component's duty is to not crash in designer or anywhere else when it happens. So I would encourage the component author to rewrite his code. > Rewrite? Ok, then TCustomForm must be rewritten, too. They now follow the same logic, at least regarding CreateParams(). Juha -------------- next part -------------- An HTML attachment was scrubbed... URL: From lazarus at mfriebe.de Mon Nov 29 17:47:53 2021 From: lazarus at mfriebe.de (Martin Frb) Date: Mon, 29 Nov 2021 17:47:53 +0100 Subject: [Lazarus] TFrame improvements In-Reply-To: References: <7b008d31-eda9-e3f9-555b-f59486101351@mfriebe.de> <8b0b8de4-2d50-f391-764c-9303c61fae9d@kluug.net> Message-ID: On 29/11/2021 17:18, Juha Manninen via lazarus wrote: > > It allows a Frame to stand without a parent in the designer or even at > runtime in some hypothetical situation(?). > Using Canvas outside Paint may not be recommended but it can be done > in some widgetsets. The component's duty is to not crash in designer > or anywhere else when it happens. > I suspect in the Designer it does not stand alone => The designer is the parent. But I have not checked. As for "at runtime" and "stand alone" (which at design time may not be possible, if the designer forces itself as parent). Is that now possible. Has anyone tested? Just because it can get a handle does not mean it will work if you try to make the handle visible. If it does fine. If it does not, then we have a new problem. We now provide a canvas, and let the user believe they painted on it. But its invisible. And if in order to make it visible, a parent is required, then that means a new Handle. So then we throw away the users work. (and the user will forever wonder way his output is not drawn....) So can a frame be visible shown standalone? And do we want to support that. (fix bugs on it, make it work for all widgetsets, ....) -------------- next part -------------- An HTML attachment was scrubbed... URL: From nc-gaertnma at netcologne.de Mon Nov 29 17:54:16 2021 From: nc-gaertnma at netcologne.de (Mattias Gaertner) Date: Mon, 29 Nov 2021 17:54:16 +0100 Subject: [Lazarus] Application.QueueAsyncCall and "conversion between ordinals and pointers is not portable" In-Reply-To: References: Message-ID: <20211129175416.1f116fa0@limapholos.matflo.wg> On Fri, 26 Nov 2021 13:15:07 +0100 Luca Olivetti via lazarus wrote: > Hello, > > Application.QueueAsyncCall is defined as > > procedure Application.QueueAsyncCall(const AMethod:TDataEvent; Data: > PtrInt); > > When I want to pass a string or a big structure as "Data", I create a > pointer and use that, casting it as PtrInt, then I use and free it in > the Async Method., e.g. > > procedure TServerThread.Log(const msg:string); > var > s: PString; > begin > new(s); > s^:=msg; > Application.QueueAsyncCall(@MainForm.LogServer, ptrint(s)); > end; > > procedure TMainForm.LogServer(data: ptrint); > var s:PString; > begin > ptruint(s):=data; //ptrint here gives a warning "use an unsigned > type" LogMemo.Lines.Add(s^); > Dispose(s); > end; > > > But that gives a hint "conversion between ordinals and pointers is > not portable". The suggestion I found is to use {%H-} to silence that > hint (which I did), but is there a better way? > > Why Data is defined as PtrInt and not pointer? Sometimes you need an integer, sometimes a pointer, and afair at the time when it was added the compiler did not warn typecasting PtrInt to Pointer. Mattias > > Bye From luca at wetron.es Mon Nov 29 18:29:00 2021 From: luca at wetron.es (Luca Olivetti) Date: Mon, 29 Nov 2021 18:29:00 +0100 Subject: [Lazarus] Application.QueueAsyncCall and "conversion between ordinals and pointers is not portable" In-Reply-To: <20211129175416.1f116fa0@limapholos.matflo.wg> References: <20211129175416.1f116fa0@limapholos.matflo.wg> Message-ID: El 29/11/21 a les 17:54, Mattias Gaertner via lazarus ha escrit: > On Fri, 26 Nov 2021 13:15:07 +0100 > Luca Olivetti via lazarus wrote: > >> Hello, >> >> Application.QueueAsyncCall is defined as >> >> procedure Application.QueueAsyncCall(const AMethod:TDataEvent; Data: >> PtrInt); >> >> When I want to pass a string or a big structure as "Data", I create a >> pointer and use that, casting it as PtrInt, then I use and free it in >> the Async Method., e.g. >> >> procedure TServerThread.Log(const msg:string); >> var >> s: PString; >> begin >> new(s); >> s^:=msg; >> Application.QueueAsyncCall(@MainForm.LogServer, ptrint(s)); >> end; >> >> procedure TMainForm.LogServer(data: ptrint); >> var s:PString; >> begin >> ptruint(s):=data; //ptrint here gives a warning "use an unsigned >> type" LogMemo.Lines.Add(s^); >> Dispose(s); >> end; >> >> >> But that gives a hint "conversion between ordinals and pointers is >> not portable". The suggestion I found is to use {%H-} to silence that >> hint (which I did), but is there a better way? >> >> Why Data is defined as PtrInt and not pointer? > > Sometimes you need an integer, sometimes a pointer, and afair at the > time when it was added the compiler did not warn typecasting PtrInt to > Pointer. True. I checked and now it even gives an hint for an integer typecasted to a pointer, so defining it as a pointer would not solve the problem if you need to pass a bare integer as data :-( Bye -- Luca Olivetti Wetron Automation Technology http://www.wetron.es/ Tel. +34 93 5883004 (Ext.3010) Fax +34 93 5883007 From juha.manninen62 at gmail.com Mon Nov 29 18:59:15 2021 From: juha.manninen62 at gmail.com (Juha Manninen) Date: Mon, 29 Nov 2021 19:59:15 +0200 Subject: [Lazarus] TFrame improvements In-Reply-To: References: <7b008d31-eda9-e3f9-555b-f59486101351@mfriebe.de> <8b0b8de4-2d50-f391-764c-9303c61fae9d@kluug.net> Message-ID: On Mon, Nov 29, 2021 at 6:47 PM Martin Frb via lazarus < lazarus at lists.lazarus-ide.org> wrote: > I suspect in the Designer it does not stand alone => The designer is the > parent. But I have not checked. > No, it has no parent. That is why it crashed. This is with the default IDE with floating windows. With the docked IDE it does have a parent. If it does not, then we have a new problem. > We now provide a canvas, and let the user believe they painted on it. But > its invisible. And if in order to make it visible, a parent is required, > then that means a new Handle. > So then we throw away the users work. (and the user will forever wonder > way his output is not drawn....) > The same potential problem applies to TForm. They both behave equally well now in the designer. Juha -------------- next part -------------- An HTML attachment was scrubbed... URL: From lazarus at kluug.net Mon Nov 29 21:09:14 2021 From: lazarus at kluug.net (Ondrej Pokorny) Date: Mon, 29 Nov 2021 21:09:14 +0100 Subject: [Lazarus] TFrame improvements In-Reply-To: References: <7b008d31-eda9-e3f9-555b-f59486101351@mfriebe.de> <8b0b8de4-2d50-f391-764c-9303c61fae9d@kluug.net> Message-ID: <59673742-acd1-ed0b-f9ea-8973bef955e5@kluug.net> On 29.11.2021 17:18, Juha Manninen via lazarus wrote: > On Mon, Nov 29, 2021 at 1:32 PM Ondrej Pokorny via lazarus > > > wrote: > > There are many scenarios when the Canvas cannot be accessed and it > is a > common mistake to access it when not allowed. > > I didn't study the issue further but to me it looks strange that > setting > some parameters in CreateParams helps with it. Juha, your commit > description "Somehow fixes issue ..." doesn't help to understand your > change either. > > > The commit message is not perfect but the committed code is, now that > I fully understand the issue. > CreateParams for Frame now follows the same logic as CreateParams for > Form. Frame is not a form. > It allows a Frame to stand without a parent in the designer or even at > runtime in some hypothetical situation(?). We definitely should't do anything with the parameters at runtime and don't allow frames to be shown as forms by default. What buttons (min/max/close/...) should be shown, what border style wtc etc? If the programmer wants to show his frame as a standalone form, he can override CreateParams() on his own. > Using Canvas outside Paint may not be recommended but it can be done > in some widgetsets. The component's duty is to not crash in designer > or anywhere else when it happens. Well, if the programmer writes his code so that it crashes, what do you want to do with it? Yes, we should handle exceptions in the designer. But your code doesn't improve this. > So I would encourage the component author to rewrite his code. > > > Rewrite? Ok, then TCustomForm must be rewritten, too. They now follow > the same logic, at least regarding CreateParams(). Rewrite his code = the custom component, not TFrame, not TCustomForm. It's basically a very bad idea to force create the handle when the component is loaded (that is what you do when you access the canvas). Ondrej -------------- next part -------------- An HTML attachment was scrubbed... URL: From lazarus at kluug.net Mon Nov 29 21:12:57 2021 From: lazarus at kluug.net (Ondrej Pokorny) Date: Mon, 29 Nov 2021 21:12:57 +0100 Subject: [Lazarus] TFrame improvements In-Reply-To: References: <7b008d31-eda9-e3f9-555b-f59486101351@mfriebe.de> <8b0b8de4-2d50-f391-764c-9303c61fae9d@kluug.net> Message-ID: On 29.11.2021 17:47, Martin Frb via lazarus wrote: > On 29/11/2021 17:18, Juha Manninen via lazarus wrote: >> >> It allows a Frame to stand without a parent in the designer or even >> at runtime in some hypothetical situation(?). >> Using Canvas outside Paint may not be recommended but it can be done >> in some widgetsets. The component's duty is to not crash in designer >> or anywhere else when it happens. >> > > I suspect in the Designer it does not stand alone => The designer is > the parent. But I have not checked. Unless you have installed the docked designer package (I don't know in what shape it is now, AFAIR Michl has done some improvements), the designer form is standalone and the frame as well (=they don't have a parent). I assume the IDE designer sets the needed window parameters for the frame at some place between loading and showing the frame. But I haven't checked now and it's been a while when I fiddled with the designer code the last time. Ondrej -------------- next part -------------- An HTML attachment was scrubbed... URL: From lazarus at kluug.net Mon Nov 29 21:20:37 2021 From: lazarus at kluug.net (Ondrej Pokorny) Date: Mon, 29 Nov 2021 21:20:37 +0100 Subject: [Lazarus] TFrame improvements In-Reply-To: <59673742-acd1-ed0b-f9ea-8973bef955e5@kluug.net> References: <7b008d31-eda9-e3f9-555b-f59486101351@mfriebe.de> <8b0b8de4-2d50-f391-764c-9303c61fae9d@kluug.net> <59673742-acd1-ed0b-f9ea-8973bef955e5@kluug.net> Message-ID: On 29.11.2021 21:09, Ondrej Pokorny via lazarus wrote: > > It's basically a very bad idea to force create the handle when the > component is loaded (that is what you do when you access the canvas). > Check TCustomLabel.CalculateSize in lcl\include\customlabel.inc for the solution how to solve this problem correctly in the component's code without any modifications needed in T(Custom)Form or T(Custom)Frame. There, the GetDC(0) is used for Canvas.Handle, so that the label's parent's handle doesn't need to be created. Ondrej From lazarus at mfriebe.de Mon Nov 29 21:40:00 2021 From: lazarus at mfriebe.de (Martin Frb) Date: Mon, 29 Nov 2021 21:40:00 +0100 Subject: [Lazarus] TFrame improvements In-Reply-To: References: <7b008d31-eda9-e3f9-555b-f59486101351@mfriebe.de> <8b0b8de4-2d50-f391-764c-9303c61fae9d@kluug.net> <59673742-acd1-ed0b-f9ea-8973bef955e5@kluug.net> Message-ID: <22cf7528-fd90-fe0b-d0ad-3a56af83b49c@mfriebe.de> On 29/11/2021 21:20, Ondrej Pokorny via lazarus wrote: > > Check TCustomLabel.CalculateSize in lcl\include\customlabel.inc for > the solution how to solve this problem correctly in the component's > code without any modifications needed in T(Custom)Form or T(Custom)Frame. > > There, the GetDC(0) is used for Canvas.Handle, so that the label's > parent's handle doesn't need to be created. > That raises another question: Why does it need that before/unless it is visible? Does autosize run, for non-visible components? From lazarus at kluug.net Mon Nov 29 22:14:15 2021 From: lazarus at kluug.net (Ondrej Pokorny) Date: Mon, 29 Nov 2021 22:14:15 +0100 Subject: [Lazarus] TFrame improvements In-Reply-To: References: <7b008d31-eda9-e3f9-555b-f59486101351@mfriebe.de> <8b0b8de4-2d50-f391-764c-9303c61fae9d@kluug.net> Message-ID: <087e7c9e-8ae3-a712-1cce-e4b355641717@kluug.net> On 29.11.2021 17:18, Juha Manninen via lazarus wrote: > On Mon, Nov 29, 2021 at 1:32 PM Ondrej Pokorny via lazarus > > > wrote: > > There are many scenarios when the Canvas cannot be accessed and it > is a > common mistake to access it when not allowed. > > I didn't study the issue further but to me it looks strange that > setting > some parameters in CreateParams helps with it. Juha, your commit > description "Somehow fixes issue ..." doesn't help to understand your > change either. > > > The commit message is not perfect but the committed code is, now that > I fully understand the issue. That is nonsense. I reverted your change. The code user code is just plain wrong and your change in TFrame doesn't change anything about it. Try e.g. : procedure TForm1.Button1Click(Sender: TObject); var   grid: TNewGrid; begin   grid := TNewGrid.Create(Self);   grid.MyProperty := 1; // exception end; Btw. Delphi behaves the same. Ondrej -------------- next part -------------- An HTML attachment was scrubbed... URL: From juha.manninen62 at gmail.com Tue Nov 30 00:27:19 2021 From: juha.manninen62 at gmail.com (Juha Manninen) Date: Tue, 30 Nov 2021 01:27:19 +0200 Subject: [Lazarus] TFrame improvements In-Reply-To: <087e7c9e-8ae3-a712-1cce-e4b355641717@kluug.net> References: <7b008d31-eda9-e3f9-555b-f59486101351@mfriebe.de> <8b0b8de4-2d50-f391-764c-9303c61fae9d@kluug.net> <087e7c9e-8ae3-a712-1cce-e4b355641717@kluug.net> Message-ID: On Mon, Nov 29, 2021 at 11:14 PM Ondrej Pokorny via lazarus < lazarus at lists.lazarus-ide.org> wrote: > On 29.11.2021 17:18, Juha Manninen via lazarus wrote: > > The commit message is not perfect but the committed code is, now that I > fully understand the issue. > > That is nonsense. I reverted your change. The code user code is just plain > wrong and your change in TFrame doesn't change anything about it. > No, the code is valid although not recommended. Accessing Canvas outside Paint works with some widgetsets and then an exception is wrong. Juha -------------- next part -------------- An HTML attachment was scrubbed... URL: From sysrpl at gmail.com Tue Nov 30 00:33:45 2021 From: sysrpl at gmail.com (Anthony Walter) Date: Mon, 29 Nov 2021 18:33:45 -0500 Subject: [Lazarus] New Synthwave Demo Message-ID: Hi guys, I just wanted to let you know I completed writing my final demo to be included in my soon to be released vector graphics and custom UI toolkit. On this page is the video and source code of the project. -------------- next part -------------- An HTML attachment was scrubbed... URL: From lazarus at kluug.net Tue Nov 30 07:23:02 2021 From: lazarus at kluug.net (Ondrej Pokorny) Date: Tue, 30 Nov 2021 07:23:02 +0100 Subject: [Lazarus] TFrame improvements In-Reply-To: References: <7b008d31-eda9-e3f9-555b-f59486101351@mfriebe.de> <8b0b8de4-2d50-f391-764c-9303c61fae9d@kluug.net> <087e7c9e-8ae3-a712-1cce-e4b355641717@kluug.net> Message-ID: On 30.11.2021 00:27, Juha Manninen via lazarus wrote: > On Mon, Nov 29, 2021 at 11:14 PM Ondrej Pokorny via lazarus > > > wrote: > > On 29.11.2021 17:18, Juha Manninen via lazarus wrote: >> The commit message is not perfect but the committed code is, now >> that I fully understand the issue. > > That is nonsense. I reverted your change. The code user code is > just plain wrong and your change in TFrame doesn't change anything > about it. > > No, the code is valid although not recommended. Accessing Canvas > outside Paint works with some widgetsets and then an exception is wrong. No, Juha, you don't understand the issue at all. Accessing Canvas outside Paint is OK under all widgetsets if done correctly. Whenever you access the canvas for text measuring you have to make sure you can do so. There are 2 solutions for it: 1.) Check HandleAllocated and skip the measurements if the handle is not allocated. Like here: https://gitlab.com/freepascal.org/lazarus/lazarus/-/commit/6e5e5b67df9d26cd477588a27029c8007d08add2 - or - 2.) If you really have to do the measurements and return something, create an extra handle for the canvas like in TCustomLabel.CalculateSize. --- The LCL's function is not to force creating the canvas when it cannot be naturally created with manipulating itself like you did. Ondrej -------------- next part -------------- An HTML attachment was scrubbed... URL: From lazarus at mfriebe.de Tue Nov 30 09:31:16 2021 From: lazarus at mfriebe.de (Martin Frb) Date: Tue, 30 Nov 2021 09:31:16 +0100 Subject: [Lazarus] TFrame improvements In-Reply-To: References: <7b008d31-eda9-e3f9-555b-f59486101351@mfriebe.de> <8b0b8de4-2d50-f391-764c-9303c61fae9d@kluug.net> <087e7c9e-8ae3-a712-1cce-e4b355641717@kluug.net> Message-ID: <06efe52a-6d64-9f6c-b576-3707fdc5ed03@mfriebe.de> On 30/11/2021 00:27, Juha Manninen via lazarus wrote: > On Mon, Nov 29, 2021 at 11:14 PM Ondrej Pokorny via lazarus > wrote: > > On 29.11.2021 17:18, Juha Manninen via lazarus wrote: >> The commit message is not perfect but the committed code is, now >> that I fully understand the issue. > > That is nonsense. I reverted your change. The code user code is > just plain wrong and your change in TFrame doesn't change anything > about it. > > No, the code is valid although not recommended. Accessing Canvas > outside Paint works with some widgetsets and then an exception is wrong. > There are 2 (or 3) question. 1) Is the fix correct: Yes (if 2 or 3), otherwise "not applicable" 2) Is it a bug in first? (and therefore is a fix needed): No. No (at least if it is at runtime) it is not a bug, because it is by design that a frame needs a form as parent. 3) Before the patch, ignoring the design time issues => did it work at runtime? (And is it indented to?) When (without the patch) the stream is read at runtime, and the frame is embedded in a Form, does the example code then work? Basically, will at runtime the parent be set, before any properties are loaded? (Or, Is that documented that it should?) => *If* this works at runtime (and if this is by intention), then there is a bug in the designer, in that the designer fails to set the parent (parent = designer) in time. I have not tested the example from the bug. But I did a quick debug of a TFrame being loaded, at runtime: - The TFrame is loading twice from lfm (the frames own lfm, and the changeds stored in the form) -- the first loading, there is no parent set => so it would/could fail. -- the 2nd loading, there is a parent The exact "expected" (not tested) behaviour for the app from the bug would be: - If the offending property has a default, and is not changed from the default => all good, property is not set during TReader - If the default is changed in the Frame's lfm => crash, because the property is set, when there is no parent. - if the default is only changed for the frame's instance on the form (stored in the form's lfm) => ok So IMHO it is save to say, that this is not supported at runtime either. Should it be? IMHO not, see below. ----------------------- This leaves improving the designer, to add a better error message, and handle it more gracefully. ----------------------- Otherwise Ondrej is right that code accessing the handle (and that includes canvas) must do checks. And TFrame is not the only place were it this is needed.   b := TPanel.Create(Form1);   a := TGraphicControl.Create(b);   //a.Parent := b;   //b.Parent := Form1;   a.Canvas.Line(1,1,2,2); You must set both parents, or it crashes. -------------- next part -------------- An HTML attachment was scrubbed... URL: From support at uvviewsoft.com Tue Nov 30 09:45:52 2021 From: support at uvviewsoft.com (Alexey Tor.) Date: Tue, 30 Nov 2021 11:45:52 +0300 Subject: [Lazarus] New Synthwave Demo In-Reply-To: References: Message-ID: quote: This demo evokes the style of the 1980s synthwave music culture using Free Pascal. I don't remember that synthwave culture. I lived in the damned communist USSR at 1980's, we did not have any synthwave. Only soviet music (==by 60% it's bad copied western music) + some (not all) hits from the west (Abba, Beatles, some rocks bands, not much, some Italian singers). Lack of hardware to play the music. Some ppl had the vanilla players, some had audio-casette players, my family did have only vanilla player, later we got soviet auto-casette player, and I asked my family to bye me ONE auto-casette per month, they were expensive. And we had queues, queues in the grocery shops 'UniverSams'. Shops which lacked many required food products (meat was rare, fish was appeared even more rare). In the childhood, we were teached at the schools about the doings of 'grandfather Lenin', the mass murderer of early USSR. In 2010-2020s, we are teached about the doings of Stalin, the mass murderer of 1930-1953. He ruled after Lenin. This is damned country. On 30.11.2021 02:33, Anthony Walter via lazarus wrote: > On this page is > the video and source code of the project. -- Alexey -------------- next part -------------- An HTML attachment was scrubbed... URL: From juha.manninen62 at gmail.com Tue Nov 30 11:18:02 2021 From: juha.manninen62 at gmail.com (Juha Manninen) Date: Tue, 30 Nov 2021 12:18:02 +0200 Subject: [Lazarus] TFrame improvements In-Reply-To: <087e7c9e-8ae3-a712-1cce-e4b355641717@kluug.net> References: <7b008d31-eda9-e3f9-555b-f59486101351@mfriebe.de> <8b0b8de4-2d50-f391-764c-9303c61fae9d@kluug.net> <087e7c9e-8ae3-a712-1cce-e4b355641717@kluug.net> Message-ID: On Mon, Nov 29, 2021 at 11:14 PM Ondrej Pokorny via lazarus < lazarus at lists.lazarus-ide.org> wrote: > That is nonsense. I reverted your change. The code user code is just plain > wrong and your change in TFrame doesn't change anything about it. > > Try e.g. : > > procedure TForm1.Button1Click(Sender: TObject); > var > grid: TNewGrid; > begin > grid := TNewGrid.Create(Self); > grid.MyProperty := 1; // exception > end; > > Btw. Delphi behaves the same. > Of course your example code throws an exception because the grid has no Parent. Assign a Parent after creation and it works. Your example shows that you don't understand the issue at all! The problem was not the grid's parent but the Frame's parent. The grid's parent is requested, it is there, then its parent's parent is requested. The Frame has no Parent by definition at design time -> exception. My fix is 100% correct. Calling it nonsense and reverting it was not nice. Please restore it. You can fix the commit message at the same go. It must go to 2.2, too. One less bug in the release. There is one alternative solution. If you are right and the component behaves wrong, then an exception must be thrown when it is placed on a Form as well. Now the behavior is inconsistent and buggy. I personally don't see why component authors should be punished with such an exception. If the component does not work, it will be evident by other means. @Martin: > 2) Is it a bug in first? (and therefore is a fix needed): No. > No (at least if it is at runtime) it is not a bug, because it is by design that a frame needs a form as parent. Why you play dummy now? You know the problem happens at design time, not runtime. The exception happened only because the code required a Frame to have a Parent which BY DEFINITION it does not have at design time under the default designer. The correct fix is to NOT require a Frame to have a Parent, which I did in my commit. > 3) Before the patch, ignoring the design time issues => did it work at runtime? (And is it indented to?) Yes, at runtime it works on both a Form and a Frame. At design time it works on a Form but crashes on a Frame which is clearly a bug. Agree? I wrote about a hypothetical situation where a Frame stands alone at runtime. It obviously does not happen with the current TFrame. I meant that my fix is logically correct also if somebody derives a *SuperFrame* for whatever reason for extra capabilities. The frame's params would still be right then. Yes, the error message is confusing. "*NewGrid1.MyProperty: Control '' has no parent window*" while it actually came recursively from the Frame.Parent. Maybe it confused Ondrej's head. It confused mine initially, and Flávio Etrusco's (see his comment). Now that I understand the issue, my fix clearly was the right one. Regards, Juha -------------- next part -------------- An HTML attachment was scrubbed... URL: From sysrpl at gmail.com Tue Nov 30 12:00:11 2021 From: sysrpl at gmail.com (Anthony Walter) Date: Tue, 30 Nov 2021 06:00:11 -0500 Subject: [Lazarus] New Synthwave Demo In-Reply-To: References: Message-ID: Here you go: https://en.wikipedia.org/wiki/Synthwave Also this: https://duckduckgo.com/?q=synthwave&iax=images&ia=images -------------- next part -------------- An HTML attachment was scrubbed... URL: From lazarus at mfriebe.de Tue Nov 30 12:35:39 2021 From: lazarus at mfriebe.de (Martin Frb) Date: Tue, 30 Nov 2021 12:35:39 +0100 Subject: [Lazarus] Moved to DEV list // Re: TFrame improvements In-Reply-To: References: <7b008d31-eda9-e3f9-555b-f59486101351@mfriebe.de> <8b0b8de4-2d50-f391-764c-9303c61fae9d@kluug.net> <087e7c9e-8ae3-a712-1cce-e4b355641717@kluug.net> Message-ID: On 30/11/2021 11:18, Juha Manninen via lazarus wrote: > Yes, at runtime it works on both a Form and a Frame. > At design time it works on a Form but crashes on a Frame which is > clearly a bug. Agree? > No, at runtime it crashes too. Of course, if you take the attached zip, you will not see this. Because the Frame is not actually used in TForm1 => so at run time the frame is never loaded. If you manage to get the frame on form1 then it crashes too. -------------- next part -------------- An HTML attachment was scrubbed... URL: From juha.manninen62 at gmail.com Tue Nov 30 12:40:39 2021 From: juha.manninen62 at gmail.com (Juha Manninen) Date: Tue, 30 Nov 2021 13:40:39 +0200 Subject: [Lazarus] New Synthwave Demo In-Reply-To: References: Message-ID: On Tue, Nov 30, 2021 at 10:46 AM Alexey Tor. via lazarus < lazarus at lists.lazarus-ide.org> wrote: > This is damned country. > Russia was damned then. Now the western world, meaning North America, Australia and EU, follows the same steps. Dissidents and Christian people are persecuted. There is segregation with special "passports". The constitution is dumped and broken constantly by corrupt politicians. Production and delivery channels are sabotaged, finally leading to food shortage and chaos. Australia already has concentration camps where the army is moving people against their will, and there is genocide of their indigenous people. Europe is following step by step. See what happens in Austria. Germany has promised similar restrictions. Russia now has better freedom of speech than my country Finland. An example: A video platform TokenTube executes freedom of speech as our laws define it. It was censored and shut down from the internet without an explanation. It came back using servers in Russia or in China (not sure which). See, people in Finland must now rely on Russia or China for their freedom of speech. Our new VKK party and its resistance has drawn attention also in Australia. https://tokentube.net/v/1598697905/Australia-haastatteli-Ilkka-Tiaista Something must be done! The plandemic is used as an excuse. I hope everybody now understands it is a scam. A request for everybody: Do not take the jabs. If you took already, don't take more. It would be unfortunate if the small Pascal community got reduced by their effects. In a year or so a new plandemic will come, most likely Marburg. Things will get worse before they get better. Sorry for being out of topic on a Pascal programming list. I am happy to exchange more information in personal mails or by other means. Regards, Juha -------------- next part -------------- An HTML attachment was scrubbed... URL: From bartjunk64 at gmail.com Tue Nov 30 19:26:24 2021 From: bartjunk64 at gmail.com (Bart) Date: Tue, 30 Nov 2021 19:26:24 +0100 Subject: [Lazarus] New Synthwave Demo In-Reply-To: References: Message-ID: On Tue, Nov 30, 2021 at 12:40 PM Juha Manninen via lazarus wrote: > A request for everybody: Do not take the jabs. If you took already, don't take more. It would be unfortunate if the small Pascal community got reduced by their effects. > In a year or so a new plandemic will come, most likely Marburg. Things will get worse before they get better. > As someone who works in healthcare I feel rather offended by you now. Covid-19 is a real thing, real people are dying under my hands right now. A Marbug pandemic most likely will kill 90% of the earths population if it could travle unrestricted around the world The virus however is so effective in killing us (and it dos that really fast), that at some point it kills all vectors (=us humans), in it's vicinity so the spread stops before the vector reaches other possible victims. Sorry for being off-topic as well. I won't reply any further to this thread. -- Bart From juha.manninen62 at gmail.com Tue Nov 30 20:12:31 2021 From: juha.manninen62 at gmail.com (Juha Manninen) Date: Tue, 30 Nov 2021 21:12:31 +0200 Subject: [Lazarus] New Synthwave Demo In-Reply-To: References: Message-ID: Now people are dying because of the jabs. Those are not side-effects, the jabs work as intended. I am more and more convinced there is no SARS-CoV-2 virus. It has not been isolated from any patient during the 2 year "pandemic". Why? The only reliable measure of a pandemic is the total number of deaths compared to earlier years. There has been no increase in deaths in almost anywhere (*) so far. In this winter we will see an increase because of the jabs' effects ... and the new Omicron variant is blamed of course. It was all planned a long ago. How are the variants detected, anyone? Even the original virus has not been isolated and the PCR tests give mostly false positives. In a Marbug plandemic (or similar) symptoms will be imposed by the "booster-shots" and a new virus will be blamed. It will not be about a real virus then either. The agenda behind the plandemic is much worse than most people realize. Wake up please. This scam can be stopped only if enough people raise to oppose it. Don't put diapers on your face, don't consent to segregation passports etc. Juha (*) The few exceptions, Italy, Spain, some US cities, in early 2020 can be explained. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gfindlay.linux at gmail.com Tue Nov 30 20:24:17 2021 From: gfindlay.linux at gmail.com (Gordon Findlay) Date: Wed, 1 Dec 2021 08:24:17 +1300 Subject: [Lazarus] New Synthwave Demo In-Reply-To: References: Message-ID: Juha: Your mails containing so many lies, and so dangerous to the community, means that I will cease being a member of the mailing list. On Wed, Dec 1, 2021 at 8:12 AM Juha Manninen via lazarus < lazarus at lists.lazarus-ide.org> wrote: > Now people are dying because of the jabs. Those are not side-effects, the > jabs work as intended. > I am more and more convinced there is no SARS-CoV-2 virus. It has not been > isolated from any patient during the 2 year "pandemic". Why? > The only reliable measure of a pandemic is the total number of deaths > compared to earlier years. There has been no increase in deaths in almost > anywhere (*) so far. In this winter we will see an increase because of the > jabs' effects ... and the new Omicron variant is blamed of course. It was > all planned a long ago. How are the variants detected, anyone? Even the > original virus has not been isolated and the PCR tests give mostly false > positives. > In a Marbug plandemic (or similar) symptoms will be imposed by the > "booster-shots" and a new virus will be blamed. It will not be about a real > virus then either. > The agenda behind the plandemic is much worse than most people realize. > Wake up please. This scam can be stopped only if enough people raise to > oppose it. Don't put diapers on your face, don't consent to segregation > passports etc. > > Juha > > (*) The few exceptions, Italy, Spain, some US cities, in early 2020 can be > explained. > > -- > _______________________________________________ > lazarus mailing list > lazarus at lists.lazarus-ide.org > https://lists.lazarus-ide.org/listinfo/lazarus > -------------- next part -------------- An HTML attachment was scrubbed... URL: From dave at haxton.org Tue Nov 30 20:27:11 2021 From: dave at haxton.org (dave at haxton.org) Date: Tue, 30 Nov 2021 14:27:11 -0500 Subject: [Lazarus] New Synthwave Demo In-Reply-To: References: Message-ID: <4ea90e5b416de96736f2abf2d988d3b6@haxton.org> Ya know, I don't post here often, but I have lost friends to this virus and I am getting really PO'd that the virus has become so political that it's infected this list, which I usually find most valuable. I'm 65 and getting ready to retire. I have no teeth. I lost my teeth as an adult because I had the measles in 1963, when I was in first grade, before a vaccine was available. The high temperature I ran for over a week baked the enamel off my then forming permanent teeth, and as a consequence I lost all of them by the time I was 30. I consider myself lucky - a couple of my friends in my first grade class never came back to school because the measles killed them. Vaccines save lives. Period. Be well, Dave H On 2021-11-30 14:12, Juha Manninen via lazarus wrote: > Now people are dying because of the jabs. Those are not side-effects, the jabs work as intended. > I am more and more convinced there is no SARS-CoV-2 virus. It has not been isolated from any patient during the 2 year "pandemic". Why? > The only reliable measure of a pandemic is the total number of deaths compared to earlier years. There has been no increase in deaths in almost anywhere (*) so far. In this winter we will see an increase because of the jabs' effects ... and the new Omicron variant is blamed of course. It was all planned a long ago. How are the variants detected, anyone? Even the original virus has not been isolated and the PCR tests give mostly false positives. > In a Marbug plandemic (or similar) symptoms will be imposed by the "booster-shots" and a new virus will be blamed. It will not be about a real virus then either. > The agenda behind the plandemic is much worse than most people realize. Wake up please. This scam can be stopped only if enough people raise to oppose it. Don't put diapers on your face, don't consent to segregation passports etc. > > Juha > > (*) The few exceptions, Italy, Spain, some US cities, in early 2020 can be explained. -------------- next part -------------- An HTML attachment was scrubbed... URL: From alfred at consulab.nl Tue Nov 30 20:47:39 2021 From: alfred at consulab.nl (Don Alfredo) Date: Tue, 30 Nov 2021 20:47:39 +0100 Subject: [Lazarus] New Synthwave Demo In-Reply-To: <4ea90e5b416de96736f2abf2d988d3b6@haxton.org> References: <4ea90e5b416de96736f2abf2d988d3b6@haxton.org> Message-ID: This is unacceptable. -------------- next part -------------- An HTML attachment was scrubbed... URL: From mr.ed.123 at gmail.com Tue Nov 30 22:38:59 2021 From: mr.ed.123 at gmail.com (Derek Edson) Date: Wed, 1 Dec 2021 10:38:59 +1300 Subject: [Lazarus] New Synthwave Demo In-Reply-To: References: Message-ID: I do not believe this is an appropriate place for this sort of discussion, especially with the untruths being spead. 1) People are not dying of the vaccines. There is absolutely no evidence to supoort this other than conspiratory theories. 2) There is clear evidence of excess deaths do exist. America is over 800,000 deaths. This is less than other pandemics only due to improved medical facilities. https://ourworldindata.org/excess-mortality-covid and https://ourworldindata.org/grapher/cumulative-excess-deaths-covid?country=USA~RUS~MEX~BRA~IRN~PER On Wed, 1 Dec 2021, 8:12 am Juha Manninen via lazarus, < lazarus at lists.lazarus-ide.org> wrote: > Now people are dying because of the jabs. Those are not side-effects, the > jabs work as intended. > I am more and more convinced there is no SARS-CoV-2 virus. It has not been > isolated from any patient during the 2 year "pandemic". Why? > The only reliable measure of a pandemic is the total number of deaths > compared to earlier years. There has been no increase in deaths in almost > anywhere (*) so far. In this winter we will see an increase because of the > jabs' effects ... and the new Omicron variant is blamed of course. It was > all planned a long ago. How are the variants detected, anyone? Even the > original virus has not been isolated and the PCR tests give mostly false > positives. > In a Marbug plandemic (or similar) symptoms will be imposed by the > "booster-shots" and a new virus will be blamed. It will not be about a real > virus then either. > The agenda behind the plandemic is much worse than most people realize. > Wake up please. This scam can be stopped only if enough people raise to > oppose it. Don't put diapers on your face, don't consent to segregation > passports etc. > > Juha > > (*) The few exceptions, Italy, Spain, some US cities, in early 2020 can be > explained. > > -- > _______________________________________________ > lazarus mailing list > lazarus at lists.lazarus-ide.org > https://lists.lazarus-ide.org/listinfo/lazarus > -------------- next part -------------- An HTML attachment was scrubbed... URL: From nc-gaertnma at netcologne.de Tue Nov 30 22:49:08 2021 From: nc-gaertnma at netcologne.de (Mattias Gaertner) Date: Tue, 30 Nov 2021 22:49:08 +0100 Subject: [Lazarus] New Synthwave Demo In-Reply-To: References: Message-ID: <20211130224908.781142db@limapholos.matflo.wg> Juha, you know, what happens to subscribers staying off topic. There are already enough platforms for such stuff. Mattias From nc-gaertnma at netcologne.de Tue Nov 30 23:18:47 2021 From: nc-gaertnma at netcologne.de (Mattias Gaertner) Date: Tue, 30 Nov 2021 23:18:47 +0100 Subject: [Lazarus] New Synthwave Demo In-Reply-To: References: Message-ID: <20211130231847.537099f5@limapholos.matflo.wg> On Wed, 1 Dec 2021 10:38:59 +1300 Derek Edson via lazarus wrote: > I do not believe this is an appropriate place for this sort of > discussion, especially with the untruths being spead. People believing in world conspiracies can't be convinced with some links and mails. Let's get back to Lazarus. Mattias