Lazarus

Using the Lazarus IDE => Designer => Topic started by: JuhaManninen on November 27, 2022, 08:58:39 am

Title: "TestAll" and other removed example projects
Post by: JuhaManninen on November 27, 2022, 08:58:39 am
This is a followup to a thread in Lazarus mailing list : Lazarus IDE 'testall' program
I do it in forum because David Bannon prefers it and I hope he will participate. He did the big revamp for the Examples window in the IDE and reorganized the example projects. I am happy this happened. The window was no good and the projects have accumulated during decades.
I am mostly a middleman here. The following is based on David's personal reply to me :

---
TestAll is mentioned in https://gitlab.com/dbannon/lazarus/-/issues/4
"TestAll - no OI and seems more a test app than a demonstration"

In https://forum.lazarus.freepascal.org/index.php/topic,57680.msg434184.html#msg43418  David raised two issues about including examples that were not really appropriate -

1. Ones that created components directly and did not use the Object Inspector
2. Ones that appeared more like test apps rather than a demonstration of how to do something specific for a user.

Several comments further down indicated that while including a few non-OI projects would help demonstrate the possibility, it was not really the purpose of this project to push such techniques.

Neither position was challenged. So, I assume, still without looking in the actual code, that TestAll was deemed unsuitable to include in the new Examples.

It may still be there as a "test" but not as an "example".

Obviously, its easily restored, just needs a metadata file made and to be merged back into main. The way the system works is any dir containing a project can be added to the example tree, easily found with a file browser but the new Examples Window will only play with it if it has a metadata file.
David would prefer Tests be filed under a Tests directory but sometimes the distinction between Tests and Examples is somewhat blurred.
---
Title: Re: "TestAll" and other removed example projects
Post by: Thaddy on November 27, 2022, 09:29:45 am
Tests as in unit tests are not very helpful as examples, they should merely test for correctness.
Examples provide - ideally close to - real world code in the sense that they should provide applicability.

The confusion arrives when 'tests' are not written in an appropriate manner, such that they are not actually tests.
Such tests should be removed or replaced with proper tests or moved to examples when applicable.

I think David is on the right track.

Things like TestAll can better be removed completely. It adds nothing. Tests should be specific, not generalized and testall is probably a misnomer.
Title: Re: "TestAll" and other removed example projects
Post by: dbannon on November 27, 2022, 10:10:54 am

Thanks Juha, Thaddy.

Yes, I can confirm that main does not have TestAll any more. It was one of those projects that was "loose" in a directory with many others, did not, to me look like a very useful Example and was, of course even named a "test".

It either predated the Object Inspector or its author, probably sensibly considering what it does, decided to just create and initialize in code. Certainly a viable way to work, I have done so myself (ie Open and Save dialogs) but it is not, in my humble opinion, generally a good Example.

Along with 8 other projects ( https://gitlab.com/dbannon/lazarus/-/issues/4 ) I thought it out of scope but easily brought back if someone wants it. From what I could see, it could do with a bit of work first ...

If it is brought back to life, it should be a Test, not an Example. If so, just how useful a test is it ?

Davo
Title: Re: "TestAll" and other removed example projects
Post by: Aruna on November 28, 2022, 04:06:04 am
Hello Juha, Thaddy and David,

'I' sent that initial email because at that time I was not aware of David's repository. Upon further investigation of David's repo under examples, I found the folder structure below.

-Beginner
-Components
-DBase
-Techniques

If I had known David was already restructuring and working on this I would not have sent out that initial email. There is no reason now to bring 'testall' back to life and it is there in branch fixes_2_2 for anyone who may want to go through the code and learn. So as far as I am concerned things are all good. I do have something else to ask all of you to give some thought to though.

When it comes to 'examples' what is to stop us from having another folder that says 'Dynamic' or 'Programmatically Created no OI' you get the idea? Some of the code in the 'testall' though definitely not welcoming for newbies does demonstrate useful techniques for more advanced users.

I am a great believer in the freedom to choose and this is one of the primary reasons I fell in love with Linux. All I am saying is what would be wrong with giving the end user browsing the code diverse options? Let them decide which way they want to go. By all means, use the IDE but also let them realize they have the freedom to do things without the OI and create everything dynamically through code. I like to think of doing this as giving the end user a complete set of available options they can use, we are not pushing anything :-)

If I was to start putting examples together for each component that effectively demonstrates how to access and use a given component's properties would that be a useful addition or not needed?

Aruna ( who is humbled on a daily basis in recent times and starting to appreciate and respect the vast amounts of lived experience, expertise and diverse communities that have contributed to Lazarus+FPC )
Title: Re: "TestAll" and other removed example projects
Post by: dbannon on November 28, 2022, 06:53:54 am
If I had known David was already restructuring and working on this I would not have sent out that initial email.
Well, that would have been a shame, we want and welcome all constructive input !

When it comes to 'examples' what is to stop us from having another folder that says 'Dynamic' or 'Programmatically Created no OI' you get the idea? Some of the code in the 'testall' though definitely not welcoming for newbies does demonstrate useful techniques for more advanced users.
There are a couple of examples still in there that do demonstrate how to make a GUI without the object Inspector, search for 'Object' and you find there is a keyword, "No Object Inspector". Its just TestAll was not one of the best Examples of that genre. Maybe "dynamic creation" is another good keyword ?  Hmm.... Dynamic Component ? Not sure ....

Can we have extra Categories ? Absolutely !  The Example Window will accept any new category you define (and thats just a case of using it as Category in a Metadata file. This rewite was really about identifying suitable Beginner projects, there were complaints that a beginner was opening the first example they found and, on average, most Examples are not beginner fodder !

The other categories exist just to make it a touch easier for people browsing.

If I was to start putting examples together for each component that effectively demonstrates how to access and use a given component's properties would that be a useful addition or not needed?
Not my call Aruna but my guess is if the quality is there, they would be very welcome.

I suggest you start slow, get one together, make a metadata file and try a pull request. Its a bit sad we don't see Juha quite as much here as we used to, he is very welcoming to new comers.

Davo

Title: Re: "TestAll" and other removed example projects
Post by: JuhaManninen on November 28, 2022, 10:19:25 am
How about putting the TestAll project to lcl/tests directory?
As noted it looks more like a test application than an example application. Even its name includes "test".
I understood Aruna is fixing its bugs under Linux. It should be tested on many platforms before putting it back. LCL is advertised as a cross-platform library and such a test application should demonstrate it.
Title: Re: "TestAll" and other removed example projects
Post by: dbannon on November 28, 2022, 11:29:27 pm
That makes good sense. I'd prefer to see it in a dir below lcl/tests but thats just me.

Aruna, can you test on "all" platforms ?  Today that means Windows 7 (?) and Windows 11, MacOS, Intel and Arm, Linux - at least eg Ubuntu and Fedora and on at least Gnome, xfce and Plasma IMHO.

I can help you with everything there xcept the MacOS Arm.  I use VMs for most of the Linux ones, have an aging Sierra Mac and access few old Windows machines.

Davo
Title: Re: "TestAll" and other removed example projects
Post by: Aruna on November 29, 2022, 01:19:39 am
Can we have extra Categories ? Absolutely ! 
This is a very good thing. One is able to extend as and when required. Nice!

The Example Window will accept any new category you define (and thats just a case of using it as Category in a Metadata file. This rewite was really about identifying suitable Beginner projects, there were complaints that a beginner was opening the first example they found and, on average, most Examples are not beginner fodder !
Complaints huh? Well, I would not have been able to complain due to me being speechless after going through the code in 'TestAllForm.pp' it impressed the hell out of me when I realized most of the heavy lifting was done dynamically through code.

At the same time it scared me to death, I was thinking 'Hell No! What did this guy smoke? This is not newbie stuff. Even a seasoned Lazarus+FPC pro would have a hard time comprehending what was going on.. '

Does anyone know who wrote 'testall' in the first place? I have lots of questions but no original author to ask?

The other categories exist just to make it a touch easier for people browsing.
Yes restructuring things the way you have will definitely help, not just newbies but most folks browsing.

If I was to start putting examples together for each component that effectively demonstrates how to access and use a given component's properties would that be a useful addition or not needed?
Not my call Aruna but my guess is if the quality is there, they would be very welcome.

I suggest you start slow, get one together, make a metadata file and try a pull request. Its a bit sad we don't see Juha quite as much here as we used to, he is very welcoming to new comers.

Davo
I will start working on one single component, say a TButton for starters, and then if it delivers the quality and effectively demonstrates how each property works I guess we can move forward from there. Else I will still continue putting stuff together for my own personal learning and hopefully will help other newcomers someday. I cloned your repo so should I work with that? Or?? Let me know..
Title: Re: "TestAll" and other removed example projects
Post by: Aruna on November 29, 2022, 01:25:39 am
How about putting the TestAll project to lcl/tests directory?
As noted it looks more like a test application than an example application. Even its name includes "test".
I understood Aruna is fixing its bugs under Linux. It should be tested on many platforms before putting it back. LCL is advertised as a cross-platform library and such a test application should demonstrate it.
I have it working on my Linux system. I am still testing and trying to break it. So far it has resisted all my attempts. I am not experienced enough yet to suggest where it should go but am sure that is just a technicality the team will figure out.
Title: Re: "TestAll" and other removed example projects
Post by: Aruna on November 29, 2022, 01:35:30 am
That makes good sense. I'd prefer to see it in a dir below lcl/tests but thats just me.

Aruna, can you test on "all" platforms ?  Today that means Windows 7 (?) and Windows 11, MacOS, Intel and Arm, Linux - at least eg Ubuntu and Fedora and on at least Gnome, xfce and Plasma IMHO.

I can help you with everything there except the MacOS Arm.  I use VMs for most of the Linux ones, have an aging Sierra Mac and access few old Windows machines.

Davo
Oh dear, I have a few distributions in a VM I can certainly test on those. I run Classic Gnome andt xfce is a click away. Testing in all the Windows versions you have mentioned will be difficult I only have Windows 7 which I used for remote work when I was a call center agent but rarely use now.  I know I have a Raspberry Pi and Firefly lying around somewhere and a whole lot of Arduino Nano's. I can certainly test on the Pi. Or maybe just set up a VM with all required testing OS's but getting Windows will be difficult for me I really do not have the $:$$ to purchase all the required versions. I have to think about this one..
Title: Re: "TestAll" and other removed example projects
Post by: Aruna on November 29, 2022, 01:56:11 am
I can help you with everything there xcept the MacOS Arm.

Davo
I did some digging and Google threw this up: https://youtu.be/6WgjQpm9VWE (https://youtu.be/6WgjQpm9VWE) seems we can run MacOS in Linux using qemu. :o
Title: Re: "TestAll" and other removed example projects
Post by: KodeZwerg on November 29, 2022, 01:57:08 am
but getting Windows will be difficult for me I really do not have the $:$$ to purchase all the required versions.
For that purpose company Microsoft offers free to use evaluation versions over here (https://developer.microsoft.com/en-us/windows/downloads/virtual-machines/).
( but I have to admit that it does not make much sense right now, they expire on February 7, 2023  :o )

Windows 10 I can offer myself it tests are needed to run.
Title: Re: "TestAll" and other removed example projects
Post by: Aruna on November 29, 2022, 02:11:37 am
but getting Windows will be difficult for me I really do not have the $:$$ to purchase all the required versions.
For that purpose company Microsoft offers free to use evaluation versions over here (https://developer.microsoft.com/en-us/windows/downloads/virtual-machines/).
( but I have to admit that it does not make much sense right now, they expire on February 7, 2023  :o )

Windows 10 I can offer myself it tests are needed to run.
Hey that link you just sent, guess what? It says --> Windows Subsystem for Linux 2 enabled with Ubuntu installed.  :D Thank you so much KodeZwerg for offering your time to test in Windows 10. Please feel free to do so once we have established which repo we should work from and any other logistical details. I am not much for online polls but maybe we should ask the people who may be willing to test and on which platform. Also may be a good idea to ask the community what they would like to see as 'examples' for newcomers. You never know what folks may come up with  %)
Title: Re: "TestAll" and other removed example projects
Post by: KodeZwerg on November 29, 2022, 02:36:28 am
Of course I can help you guys to find bugs or unstable/incompatible things for a Windows 10 project.
I got myself latest stable Lazarus 2.2.2 (rev lazarus_2_2_2-0-g537f43754c) FPC 3.2.2 x86_64-win64-win32/win64 installed via FPC Update Deluxe program.
On my system I have that example installed, shall that be tested or a different version? If differen, please link  :-*
Title: Re: "TestAll" and other removed example projects
Post by: dbannon on November 29, 2022, 11:54:50 am
At the same time it scared me to death, I was thinking 'Hell No! What did this guy smoke?

Yeah, it must have been good stuff !  But seriously, I reckon it was written for testing rather than demo. An, perhaps, it was written before the Lazarus Wizards got all the GUI designer in place. That is is the key to the "Rapid" bit.


I cloned your repo so should I work with that? Or?? Let me know..

My repo ?  No, no, its way out of date now, I stopped syncing it when my stuff was accepted in lazarus-main. No, go to the official source please.

Quote from: Aruna
Testing in all the Windows versions you have mentioned will be difficult I
Sorry, I was not clear, I generally test on Windows 7 and Windows 11, if something works on those ends, it must be OK in the middle. Or so I hope.

Testing arm is becoming more important but so far, touch wood, I have never found a difference between one particular distro on x86_64 and same distro on armhf. But there are, sadly, lots of differences between Linux system, mostly related to Desktops. And Wayland. Not good.  The two broad flavors of Linux, the Deb based ones and the RPM based ones do put libraries in different places. So, care with assumptions is needed.

I personally always have about ten (ok, I counted them, 36 !) Virtual Box VMs ready to go. Its an absolute pain but if you don't test and find the problems, your users will do it for you !

@KodeZwerg, you are, my friend, the Windows expert in this discussion !

The real issue here is the new work that is in -main, been there now for six months and might make it to release with the next major release of Lazarus. So, to see what we are talking about, you have to use -main.  Its dead easy to build from source (with your existing FPC) and setup to not interfere in any way with your existing install, just make sure it uses a separate PCP.  I have worked through all the examples, set them all up with  metadata and quite a lot have a keyword in that metadata "needs work".  (note - Andreas fixed one today  :D )

But you will not see all that in Lazaris 2.2.2, sorry !

Davo
Title: Re: "TestAll" and other removed example projects
Post by: JuhaManninen on November 29, 2022, 08:44:52 pm
Does anyone know who wrote 'testall' in the first place? I have lots of questions but no original author to ask?
In Linux console, active directory being the Lazarus git source root, I ran :
Code: [Select]
$ git log examples/testall*It gives the output copied below. The very first commit says the author is <christer.t.johansson@se.abb.com>. It was committed by somebody called stoppok.
A commit author name "lazarus" was used collectively by all core developers in the early days, much before I got involved.
A still better way to see the commits is the GUI app "gitk". There you can see also the diff for each commit interactively.
Like this:
Code: [Select]
$ gitk examples/testall* &
I have not heard of Christer T Johansson. Like often in FOSS development, original authors are not available and decisions must be made by other people.

Code: [Select]
commit 4e96538dd29e3a93a19e85ea11b6c2334f6fb8e8
Author: wp <wp.no-reply@lazarus-ide-org>
Date:   Thu Jul 1 21:59:50 2021 +0000

    examples: Fix typo in TestAll demo.
   
    git-svn-id: trunk@65337 -

commit 337b198136a9f964ff5207f8a215fe58572622aa
Author: juha <juha@lazarus-ide.org>
Date:   Thu Dec 10 22:12:35 2020 +0000

    Examples: Fix dir separator in testall.lpi.
   
    git-svn-id: trunk@64194 -

commit 5328b9a852b4612ff466bd01ce4444db454997e0
Author: juha <juha@lazarus-ide.org>
Date:   Mon May 6 11:32:58 2019 +0000

    Examples: Use '/' as path delimiter in project settings. Works also on Windows. Issue #35524.
   
    git-svn-id: trunk@61164 -

commit b5251d215211fdc3d492f15d93f5aa67c29b0ccb
Author: juha <juha@lazarus-ide.org>
Date:   Thu May 11 09:04:51 2017 +0000

    Examples: Remove PathDelim and LaunchingApplication settings from the projects.
   
    git-svn-id: trunk@54873 -

commit 6b1b3acb9fb514128bf90dab05cbf3b7dd2cb298
Author: mattias <nc-gaertnma@netcologne.de>
Date:   Sun Apr 9 09:25:32 2017 +0000

    examples: fixed testall.lpi
   
    git-svn-id: trunk@54587 -

commit 1de2cbf5869ce14117ba89ca8bb1d23fcdf90785
Author: joost <joost@lazarus-ide.org>
Date:   Sun Jan 29 21:04:32 2017 +0000

    general: Updated address of the Free Software Foundation in copyright messages
   
    git-svn-id: trunk@54031 -

commit bd5c9173409b4dd68d83ec99aa5ca97b8abe5461
Author: bart <9132501-flyingsheep@users.noreply.gitlab.com>
Date:   Sun Mar 6 11:15:52 2016 +0000

    Examples: TestAll: more dialog tests (provided by jc99, modifiedby me).
   
    git-svn-id: trunk@51832 -

commit 376303c792325ffa431ad8ea94a368420c0d0202
Author: bart <9132501-flyingsheep@users.noreply.gitlab.com>
Date:   Sat Mar 5 23:19:44 2016 +0000

    Examples: TestAll: add testallform.lfm, which I forgot in r51824 #87791326d0.
   
    git-svn-id: trunk@51831 -

commit 01358aea67fb7d74b6f2e1a8417c13594550293a
Author: bart <9132501-flyingsheep@users.noreply.gitlab.com>
Date:   Sat Mar 5 17:37:41 2016 +0000

    Examples: TestAll: don't write an extra '$' in front of Key when logging Key events.
   
    git-svn-id: trunk@51828 -

commit 36e0d69b90897e32141a48429ed23b552245897f
Author: bart <9132501-flyingsheep@users.noreply.gitlab.com>
Date:   Sat Mar 5 15:21:10 2016 +0000

    Examples: TestAll: more component tests.
   
    git-svn-id: trunk@51827 -

commit 96ba7a6b4036f65806c2720da31331a29de63e1d
Author: bart <9132501-flyingsheep@users.noreply.gitlab.com>
Date:   Sat Mar 5 13:09:33 2016 +0000

    Examples: TestAll:
    - make dummy procedures for all tests and call them in the menu's onclick event
    - fix typo
    - refactor
    - cleanup
   
    git-svn-id: trunk@51826 -

commit b9a5f9bcc96b0145e8dc8ea7735ecf9380b57a90
Author: bart <9132501-flyingsheep@users.noreply.gitlab.com>
Date:   Fri Mar 4 18:13:13 2016 +0000

    Examples: TestAll: add a test (work in progress).
   
    git-svn-id: trunk@51825 -

commit 87791326d0da7a8bf46b1f06a9df425beb15f7bf
Author: bart <9132501-flyingsheep@users.noreply.gitlab.com>
Date:   Fri Mar 4 15:05:52 2016 +0000

    Examples: Start completely rewrting the TestAll apllication.
   
    git-svn-id: trunk@51824 -

commit 161225d29fe5481fc51eb70222c4f96c0763c90e
Author: bart <9132501-flyingsheep@users.noreply.gitlab.com>
Date:   Thu Mar 3 12:13:28 2016 +0000

    Examples: Make Debug and Release buildmodes for TestAll project.
   
    git-svn-id: trunk@51815 -

commit 6b8f2f492a1e81ff65562d83f97a9ed9157f3a14
Author: bart <9132501-flyingsheep@users.noreply.gitlab.com>
Date:   Thu Mar 3 12:09:01 2016 +0000

    Examples: Re-enable "Win32 GUI application" of TestAll project (accidentically introduced by me in r51813 #c83e1c15e5).
   
    git-svn-id: trunk@51814 -

commit c83e1c15e533cedfa9109fded543e96258876e92
Author: bart <9132501-flyingsheep@users.noreply.gitlab.com>
Date:   Thu Mar 3 11:30:47 2016 +0000

    Examples: Fix resource loading in TestAll project.
   
    git-svn-id: trunk@51813 -

commit 931c7a9de4714c4a8ef4e9a9bacca45befe03947
Author: juha <juha@lazarus-ide.org>
Date:   Sat Jul 4 23:08:27 2015 +0000

    Examples: Fix compilation when function wrappers in FileUtil are disabled (define NoLazUTF8Wrappers). Clean uses sections.
   
    git-svn-id: trunk@49495 -

commit 6b22a465f7480392f98b9979584f7665e6e81bc3
Author: mattias <nc-gaertnma@netcologne.de>
Date:   Mon Mar 2 18:57:39 2015 +0000

    examples: removed obsolete SrcPath
   
    git-svn-id: trunk@48101 -

commit 0e8dcc15e16b4cfacdeeaac527e31cfb42c62bf0
Author: paul <paul@lazarus-ide.org>
Date:   Sat Sep 28 15:25:27 2013 +0000

    examples: use FPC resources
   
    git-svn-id: trunk@43013 -

commit 844e61673882e1496c6a20d6c84a273d5afb2562
Author: juha <juha@lazarus-ide.org>
Date:   Mon Apr 9 08:24:59 2012 +0000

    IDE etc.: unify 3 dots in GUI string to have a space ( ...).
   
    git-svn-id: trunk@36666 -

commit 503169d0a118d8d31aa62bee50d371fdc9fa5617
Author: maxim <maxim@lazarus-ide.org>
Date:   Wed Aug 10 19:57:50 2011 +0000

    Examples: replaced 'inherited create' with 'inherited createnew'
   
    git-svn-id: trunk@31931 -

commit 01db3bb47c041d0fefeeb9ac8a5d27c9818a1af5
Author: juha <juha@lazarus-ide.org>
Date:   Sun Mar 13 18:21:51 2011 +0000

    LCL (mostly), Replace Assert(False... with //DebugLn(...  Now Assert can be used for its original purpose again.
   
    git-svn-id: trunk@29820 -

commit a460a9d3ee89d2b234de43a79dfac8358f8da54d
Author: maxim <maxim@lazarus-ide.org>
Date:   Wed Feb 16 23:45:39 2011 +0000

    Examples, TestAll: disabled TNotebook, enabled TPageControl instead
   
    git-svn-id: trunk@29584 -

commit 0e109ea1e1d2af01c571b215fd32ee4d6f03e245
Author: mattias <nc-gaertnma@netcologne.de>
Date:   Thu Feb 10 09:43:23 2011 +0000

    fixed typos: usefull
   
    git-svn-id: trunk@29446 -

commit a02fa3589a6fefa57d592ecea4876c39a85ae8e7
Author: vincents <vincents@lazarus-ide.org>
Date:   Fri Oct 29 13:32:57 2010 +0000

    testall example:
    * change form style form bsDialog to bsSizable, so that the main menu is shown (issue #16166)
    * fixed line ending in captions: #10#13 -> #13#10
   
    git-svn-id: trunk@27947 -

commit 2ca43e9903078a21efe0bc770cd7ab1447d83fbd
Author: martin <laz.git@mfriebe.de>
Date:   Thu Jul 23 12:13:00 2009 +0000

    Examples: Fix testallform for fpc2.3.1 (issue #14184)
   
    git-svn-id: trunk@20931 -

commit 298c34c4257896188516b29964c2fc96d59a174f
Author: paul <paul@lazarus-ide.org>
Date:   Sun May 10 07:54:53 2009 +0000

    examples: fix testall example (issue #0013679)
   
    git-svn-id: trunk@19903 -

commit b28e26843dc244e2d898ef16c920ac7eac2b3821
Author: paul <paul@lazarus-ide.org>
Date:   Mon May 4 05:37:46 2009 +0000

    examples: fix button resource name
   
    git-svn-id: trunk@19792 -

commit 04c9b5cd7426d752777dc8a2137cf9d734f46083
Author: paul <paul@lazarus-ide.org>
Date:   Sat Jan 31 12:02:35 2009 +0000

    examples: remove Crl3D, ParentCtl3D properties
   
    git-svn-id: trunk@18516 -

commit 4b344f137ae19f7397db4eafd237b7bb92148016
Author: laurent <laurent@lazarus-ide.org>
Date:   Tue Dec 2 13:28:21 2008 +0000

    IDE: rename the images to avoid overload
   
    git-svn-id: trunk@17660 -

commit 908ad54b8f606b309292d5f5aea3bafb96e24fc4
Author: mattias <nc-gaertnma@netcologne.de>
Date:   Mon Aug 25 22:40:11 2008 +0000

    examples: fixed compilation
   
    git-svn-id: trunk@16237 -

commit aecb1279934ea5062e5113c6118ffdb626ac93d3
Author: marc <marc@lazarus-ide.org>
Date:   Thu Apr 24 23:48:27 2008 +0000

    * Fixed compilation and some memleaks
   
    git-svn-id: trunk@14954 -

commit 83ebfd06726cbaf5f287b934d54a9e6205e4e1b6
Author: vincents <vincents@lazarus-ide.org>
Date:   Sat Feb 23 19:33:06 2008 +0000

    examples: fixed compilation after the removal of the clistbox unit from Maxim Ganetsky
   
    git-svn-id: trunk@14235 -

commit 7e9fc77a93b3511e99168f08526ae2eb0db2b547
Author: vincents <vincents@lazarus-ide.org>
Date:   Mon Apr 10 11:18:13 2006 +0000

    removed ShowScale
   
    git-svn-id: trunk@9113 -

commit 95ca76e85edc433d7d03f14daf28aafbcd92fa36
Author: mattias <nc-gaertnma@netcologne.de>
Date:   Sat Oct 1 00:38:04 2005 +0000

    added .lpi for examples
   
    git-svn-id: trunk@7869 -

commit a0311c2cbac64da9a893cbb5ba64f62d5f04e3cc
Author: vincents <vincents@lazarus-ide.org>
Date:   Mon Aug 22 12:30:03 2005 +0000

    removed cvs logs
   
    git-svn-id: trunk@7541 -

commit 225cd324660b1b29bf5950587f18c729c06a7968
Author: vincents <vincents@lazarus-ide.org>
Date:   Sat Sep 11 20:22:18 2004 +0000

    set form style to fsNormal, so that it becomes the mainform
   
    git-svn-id: trunk@5973 -

commit 59ace4ca3bf173cd1a2321cdd8ba9cccbdf886f9
Author: mattias <nc-gaertnma@netcologne.de>
Date:   Thu Feb 19 09:45:40 2004 +0000

    fixed compilation   from Vincent
   
    git-svn-id: trunk@5207 -

commit a3000e4875468a9c678d7ed3cb2b06dc5ab0e828
Author: mattias <nc-gaertnma@netcologne.de>
Date:   Mon Dec 8 14:27:16 2003 +0000

    fixed WaitForHandles
   
    git-svn-id: trunk@4881 -

commit ab426e35718c8ec7ca86d78b503c68ee1baa4f11
Author: mattias <nc-gaertnma@netcologne.de>
Date:   Tue Nov 25 09:15:55 2003 +0000

    fixed testall
   
    git-svn-id: trunk@4839 -

commit 5e5c1122a7a636e599ac5d8bb409a7b1599e82bd
Author: mattias <nc-gaertnma@netcologne.de>
Date:   Thu Sep 18 09:21:03 2003 +0000

    renamed LCLLinux to LCLIntf
   
    git-svn-id: trunk@4637 -

commit 0d883f89b8ef3e154e2e21d6664943857106a54b
Author: mattias <nc-gaertnma@netcologne.de>
Date:   Wed Jan 1 11:11:50 2003 +0000

    fixed testall example
   
    git-svn-id: trunk@3773 -

commit 09138261ffe900180e59df2d3c0ab21345d2c926
Author: lazarus <lazarus@lazarus-ide.org>
Date:   Tue Oct 29 08:22:33 2002 +0000

    MG: added interfaces unit
   
    git-svn-id: trunk@3578 -

commit bbc829a44b2c5f9dc5ff546fc72ba6be8ae1c9da
Author: lazarus <lazarus@lazarus-ide.org>
Date:   Tue Sep 10 14:08:54 2002 +0000

    MG: fixed compiling examples
   
    git-svn-id: trunk@3313 -

commit 98399ff1a9059e6d79531424cbc3c8fefbf5b673
Author: lazarus <lazarus@lazarus-ide.org>
Date:   Sun Aug 18 08:53:33 2002 +0000

    MG: TNoteBook now starts with no Page and TPage has no auto names
   
    git-svn-id: trunk@2753 -

commit 6c9464c470122f2f48889e91d031da545fbd9b4c
Author: lazarus <lazarus@lazarus-ide.org>
Date:   Fri May 10 06:57:51 2002 +0000

    MG: updated licenses
   
    git-svn-id: trunk@1668 -

commit 0f5c59201ba5c902614987d43a824eba0433a0a9
Author: lazarus <lazarus@lazarus-ide.org>
Date:   Sat Mar 23 21:02:02 2002 +0000

    + Enhanced testall-app with demo for TPanel, stoppok
   
    git-svn-id: trunk@1540 -

commit 09ca1546a5eb125a8560b91e10400c777384be9c
Author: lazarus <lazarus@lazarus-ide.org>
Date:   Sat Feb 9 02:30:23 2002 +0000

    MG: updated licenses
   
    git-svn-id: trunk@1399 -

commit c9e180acac39615fa5faf99ad009230539e38425
Author: lazarus <lazarus@lazarus-ide.org>
Date:   Sun Feb 3 00:24:02 2002 +0000

    TPanel implemented.
    Basic graphic primitives split into GraphType package, so that we can
    reference it from interface (GTK, Win32) units.
    New Frame3d canvas method that uses native (themed) drawing (GTK only).
    New overloaded Canvas.TextRect method.
    LCLLinux and Graphics was split, so a bunch of files had to be modified.
   
    git-svn-id: trunk@653 -

commit c1f59f9e4c5ef80b2347c349c26e89ec52412a1e
Author: lazarus <lazarus@lazarus-ide.org>
Date:   Mon Dec 10 07:47:00 2001 +0000

    MG: minor fixes
   
    git-svn-id: trunk@492 -

commit bfe772f3318f43dfff0147a58df5214064fbfd59
Author: lazarus <lazarus@lazarus-ide.org>
Date:   Tue Apr 17 21:36:15 2001 +0000

    * enhanced testdialog for TBevel
    * basic test for TPaintBox
    stoppok
   
    git-svn-id: trunk@264 -

commit d0de3587929fe250d4ec24bb87c0dbf2bda46dc2
Author: lazarus <lazarus@lazarus-ide.org>
Date:   Sun Feb 25 09:22:28 2001 +0000

    * Fixed crash caused by missing pixmaps
    * using resources now instead of xpm file
   
    git-svn-id: trunk@197 -

commit 2b8c03b5ea631f615970965cd6fe0fbfc8cb7b1a
Author: lazarus <lazarus@lazarus-ide.org>
Date:   Fri Sep 22 20:22:03 2000 +0000

    +Rebuilt from beginning to V0.2
    +Prepared for non existent components (total 60 components).
    (Changes by Christer, commited by stoppok)
   
    git-svn-id: trunk@37 -

commit 35cc9bddc63d721f7ace8cc1d69e1d4b5f497230
Author: lazarus <lazarus@lazarus-ide.org>
Date:   Mon Jul 31 20:33:33 2000 +0000

    + added "testall" demo provided by <christer.t.johansson@se.abb.com>
    stoppok
   
    git-svn-id: trunk@18 -

Of course I can help you guys to find bugs or unstable/incompatible things for a Windows 10 project.
I got myself latest stable Lazarus 2.2.2 (rev lazarus_2_2_2-0-g537f43754c) FPC 3.2.2 x86_64-win64-win32/win64 installed via FPC Update Deluxe program.
On my system I have that example installed, shall that be tested or a different version? If differen, please link  :-*
https://gitlab.com/freepascal.org/lazarus/lazarus/-/branches
"main" is the default branch. It is active when you first clone the Lazarus Git repository.
Everybody involved in Lazarus development, including those testing changes made by others, must use it.
Title: Re: "TestAll" and other removed example projects
Post by: Aruna on November 30, 2022, 05:38:47 am
At the same time it scared me to death, I was thinking 'Hell No! What did this guy smoke?

Yeah, it must have been good stuff !  But seriously, I reckon it was written for testing rather than demo. An, perhaps, it was written before the Lazarus Wizards got all the GUI designer in place. That is is the key to the "Rapid" bit.
Yes it was probably way before that. Like Juha showed us I ran
Code: Pascal  [Select][+][-]
  1. git log examples/testallform.pp
and date of first commit was Mon Jul 31 20:33:33 2000 +0000 that is 22 years ago (Yikes!) and we have a name and a email now. See below for details please.

Code: Pascal  [Select][+][-]
  1. commit 35cc9bddc63d721f7ace8cc1d69e1d4b5f497230
  2. Author: lazarus <lazarus@lazarus-ide.org>
  3. Date:   Mon Jul 31 20:33:33 2000 +0000
  4.  
  5.     + added "testall" demo provided by <christer.t.johansson@se.abb.com>
  6.     stoppok
  7.  
I personally always have about ten (ok, I counted them, 36 !) Virtual Box VMs ready to go. Its an absolute pain but if you don't test and find the problems, your users will do it for you !
He has 36 VM's ready to go  :o and I have a little surprise for you all. Please see attached screenshot. I am running 2.3.0  ;)
Title: Re: "TestAll" and other removed example projects
Post by: Aruna on November 30, 2022, 12:20:14 pm
Sorry, I was not clear, I generally test on Windows 7 and Windows 11, if something works on those ends, it must be OK in the middle. Or so I hope.
I would think that makes a whole lot of sense but I tend to be extremely careful and cautious with Windows due to being left hanging high to dry so many countless times  :)

Its dead easy to build from source (with your existing FPC) and setup to not interfere in any way with your existing install, just make sure it uses a separate PCP. 
David I could use some help, please. Agreed it's dead easy to build from source which is what I did with 2.3.0 but then it threw up the first screenshot and I chose update then it showed me the second screenshot I chose ignore all. The IDE came up but undocked so I rebuilt and voila I have things back to what they were and so far no noticeable issues or hangs. I can work with this but it is annoying when this keeps happening at every time I start up the IDE. I am trying to figure out how to use the pcp so can use some help please?

I have worked through all the examples, set them all up with  metadata and quite a lot have a keyword in that metadata "needs work".  (note - Andreas fixed one today  :D )
Yep I saw that commit in Gitlab  :)

But you will not see all that in Lazaris 2.2.2, sorry !
I am running 2.3.0 and I am seeing all those nifty examples eh  8-)

Thank you, Aruna

Title: Re: "TestAll" and other removed example projects
Post by: dbannon on November 30, 2022, 01:27:51 pm
David I could use some help, please. Agreed it's dead easy to build from source which is what I did with 2.3.0 but then it threw up the first screenshot and I chose update then it showed me the second screenshot I chose ignore all. The IDE came up but undocked so I rebuilt and voila I have things back to what they were and so far no noticeable issues or hangs. I can work with this but it is annoying when this keeps happening at every time I start up the IDE. I am trying to figure out how to use the pcp so can use some help please?

PCP ?  Primary Config Path. Start lazarus like this -
Code: [Select]
lazarus --pcp=/home/dbannon/bin/LazConfigs/lazarus-main
Or drop a file in the lazarus-main directory called lazarus.cfg and put "--pcp=/path/to/dir/for/config" and always cd to that dir to start that particular Lazarus.

I have a few scripts called, eg laz-main, in my bin dir, all they do is cd to the appropriate dir and start the version of lazarus in there. Each of those various lazarus directories have thier own .cfg file.

I keep all my configs in that dir (~/bin/LazConfigs), each in a subdir named after the particular Lazarus install. So, laz-fixes_2_2 is in ~/bin/LazConfigs/laz-fixes_2_2.
Don not let the configs get mixed up, Lazarus is smart enought to update an older version but when you try to run that older version later, bad things happen.

On the other hand, if will only ever run lazarus-main, just shut down Lazarus, blow away the default dir ~/.lazarus and start Lazarus up again, it will rebuild its config fine.

Now, another matter, you posted to the mailing list a link to a list of the files removed from the old Examples dir, in fact they were not all removed, most, almost all, found their way into their own directory where they are now very happy !


>>But you will not see all that in Lazaris 2.2.2, sorry !
>I am running 2.3.0 and I am seeing all those nifty examples eh  8-)

those comments were directed to  KodeZwerg

[/quote]
Title: Re: "TestAll" and other removed example projects
Post by: Aruna on November 30, 2022, 02:40:31 pm
David I could use some help, please. Agreed it's dead easy to build from source which is what I did with 2.3.0 but then it threw up the first screenshot and I chose update then it showed me the second screenshot I chose ignore all. The IDE came up but undocked so I rebuilt and voila I have things back to what they were and so far no noticeable issues or hangs. I can work with this but it is annoying when this keeps happening at every time I start up the IDE. I am trying to figure out how to use the pcp so can use some help please?

PCP ?  Primary Config Path. Start lazarus like this -
Code: [Select]
lazarus --pcp=/home/dbannon/bin/LazConfigs/lazarus-main
Or drop a file in the lazarus-main directory called lazarus.cfg and put "--pcp=/path/to/dir/for/config" and always cd to that dir to start that particular Lazarus.
Alright, I will try that, thank you.

I have a few scripts called, eg laz-main, in my bin dir, all they do is cd to the appropriate dir and start the version of lazarus in there. Each of those various lazarus directories have thier own .cfg file.

I keep all my configs in that dir (~/bin/LazConfigs), each in a subdir named after the particular Lazarus install. So, laz-fixes_2_2 is in ~/bin/LazConfigs/laz-fixes_2_2.
I think I will do likewise...

Don not let the configs get mixed up, Lazarus is smart enought to update an older version but when you try to run that older version later, bad things happen.
What kind of bad things? What are the bad things that happened to you? The reason I am asking is if we know what went wrong then we can slowly fix things over time?

On the other hand, if will only ever run lazarus-main, just shut down Lazarus, blow away the default dir ~/.lazarus and start Lazarus up again, it will rebuild its config fine.
Right now it is just lazarus-main but as I progress I am sure that will change.

Now, another matter, you posted to the mailing list a link to a list of the files removed from the old Examples dir, in fact they were not all removed, most, almost all, found their way into their own directory where they are now very happy !
Where? Which directory?

>>But you will not see all that in Lazaris 2.2.2, sorry !
>I am running 2.3.0 and I am seeing all those nifty examples eh  8-)

those comments were directed to  KodeZwerg
Ouch! Oh dear, my apologies. Please disregard what I said.. and very much appreciate the help and guidance.

Title: Re: "TestAll" and other removed example projects
Post by: dbannon on December 03, 2022, 01:01:30 am
What kind of bad things? What are the bad things that happened to you? The reason I am asking is if we know what went wrong then we can slowly fix things over time?
Because each version of Lazarus has possibly different config they are incompatible. Generally Lazarus detects that and warns you (and reliably updrades). But, if you try hard you can force it and then (especially if going back to earlier version), some options may not make sense, some, if you are unlucky might just make sense but have different meanings. No different to any other software,


.... almost all, found their way into their own directory where they are now very happy !
Where? Which directory?

In the same place, lazarus/examples. For example, notebk.lpi is in  lazarus/examples/NoteBk/. combobox.lpi is in lazarus/examples/combobox/.

Many of the homeless projects, loose in /lazarus/examples, were more test code than examples.  But certainly not all.

Davo
Title: Re: "TestAll" and other removed example projects
Post by: KodeZwerg on December 03, 2022, 01:16:15 am
Latest (https://gitlab.com/freepascal.org/lazarus/lazarus/-/branches) Lazarus on where you are testing things out.
I was reading all of your thread but I am really an absolute beginner with installation, thats why i did used the fpc update deluxe app  :'(

Is there a manual that explains me how to install that "/branches" on my windows machine please?
In attachment you see what my browser is offering me.
Title: Re: "TestAll" and other removed example projects
Post by: Aruna on December 03, 2022, 05:18:22 am
What kind of bad things? What are the bad things that happened to you? The reason I am asking is if we know what went wrong then we can slowly fix things over time?
Because each version of Lazarus has possibly different config they are incompatible. Generally Lazarus detects that and warns you (and reliably updrades). But, if you try hard you can force it and then (especially if going back to earlier version), some options may not make sense, some, if you are unlucky might just make sense but have different meanings. No different to any other software,
I see.. I will be careful..

.... almost all, found their way into their own directory where they are now very happy !
Where? Which directory?

In the same place, lazarus/examples. For example, notebk.lpi is in  lazarus/examples/NoteBk/. combobox.lpi is in lazarus/examples/combobox/.

Many of the homeless projects, loose in /lazarus/examples, were more test code than examples.  But certainly not all.

Davo
Oh-kay sounds great, thank you.
Title: Re: "TestAll" and other removed example projects
Post by: dbannon on December 03, 2022, 05:39:41 am
Latest (https://gitlab.com/freepascal.org/lazarus/lazarus/-/branches) Lazarus on where you are testing things out.
I was reading all of your thread but I am really an absolute beginner with installation, thats why i did used the fpc update deluxe app  :'(

Is there a manual that explains me how to install that "/branches" on my windows machine please?
In attachment you see what my browser is offering me.
KodeZwerg, its pretty easy. Unless you are chasing a quite specific issue, the things you see under Branches are probably not that interesting to you, right now 'main' and Fixes_2_2 would be about all. Further down under the same combo box, are Tags, again, maybe all you need there is lazarus_2_2_4, the current release and just maybe lazarus_2_2_0rc2, the last one to have a working GoTo Bookmark system in the IDE.

If you are planning to send in patches in an ongoing manner, then you should download with git, thats a whole different discussion. If you just want to get a specific version, easy and quick to download that Branch/Tag from the button one to left of the Blue "Clone" button, save it as a zip, unzip, cd into the new dir and type "make bigide" - all assuming you have a suitable FPC installed and correctly setup on your PATH. I keep a close eye on the linux page but assume, for you, its all documented on https://wiki.freepascal.org/Installing_Lazarus_on_Windows.

I have done it on Windows but I am a long way from authoritative, someone else here will be however.

We are probably drifting somewhat off topic here I expect .....

Davo
Title: Re: "TestAll" and other removed example projects
Post by: Aruna on December 03, 2022, 05:41:11 am
Latest (https://gitlab.com/freepascal.org/lazarus/lazarus/-/branches) Lazarus on where you are testing things out.
I was reading all of your thread but I am really an absolute beginner with installation, thats why i did used the fpc update deluxe app  :'(
It's not hard to do an install. You can select the install that matches your OS of choice below.
Lazarus Downloads (https://www.lazarus-ide.org/index.php?page=downloads)

Is there a manual that explains me how to install that "/branches" on my windows machine, please?
In attachment you see what my browser is offering me.
Those /branches your seeing are 'git' branches and they are all in a git repository. So the easiest thing to do is to clone the entire repository.
There are multiple ways to clone a repository. You will need to install 'git' if it is not available in your system.
You can download git from here (https://git-scm.com/download/win)

I have attached two screenshots.

The first screenshot is the main branch repository (https://gitlab.com/freepascal.org/lazarus/lazarus/-/tree/main)  there is a blue button at the top right
that says 'clone' and when you click this button you will see the second screenshot and there are many ways to clone/download the repository. Once
downloaded you can select the git branch you wish to work on by typing the command below in git-bash under Windows in this case I
want to work on the branch fixes_2_2
Code: Pascal  [Select][+][-]
  1. git checkout fixese_2-2
Most people 'fork' the repository they want to work on then clone the repository they
just forked and work on that on their local system. Then when your changes are made
and tested and you want to get them merged into the main repository you push those
changes to your remote repository first then create a pull request or merge request for the original Lazarus repository.

If you use Visual Studio Code life will be easy. If you wish to 'experiment' I would advise you to absolutely do so... Google is your friend, there are many tutorials on
how to use git out there on the public domain internet. If you have difficulties you can always ask here and we will be happy to help.
Title: Re: "TestAll" and other removed example projects
Post by: JuhaManninen on December 03, 2022, 09:02:02 am
Latest (https://gitlab.com/freepascal.org/lazarus/lazarus/-/branches) Lazarus on where you are testing things out.
I was reading all of your thread but I am really an absolute beginner with installation, thats why i did used the fpc update deluxe app  :'(

Is there a manual that explains me how to install that "/branches" on my windows machine please?
In attachment you see what my browser is offering me.
The branches link apparently confused you. For testing the latest changes you only need the "main" branch which is the default in our Git repo.
To get it see:
 https://wiki.lazarus.freepascal.org/Getting_Lazarus
starting from "Getting a Git client" and then forward.

You can also continue to use FpcUpDeluxe if you want. It has an option to get the development "main" branch.
But, you don't need FpcUpDeluxe for this simple task if you have FPC already installed. Shortly put just :
1. Create a directory in Windows for the repository, eg. "lazarus_git".
2. Clone the Lazarus Git repository there (using TortoiseGit maybe).
3. On a cmd line, cd to that directory.
4. Run "make". (On Windows "make" comes with FPC installation).
5. Run "lazarus.exe". No need to install anything. Installations of other Lazarus versions stay intact. Use --pcp parameter to use a different Lazarus configuration.

You need to learn some basic concepts of Git. There are plenty of resources for that. Do a web search "git for beginners".
If you and others want to discuss and share information about specific Git features, please do it in a new forum thread. There is a danger this "TestAll" thread will become a yet another Git tutorial.
Title: Re: "TestAll" and other removed example projects
Post by: Aruna on December 03, 2022, 04:53:56 pm
If you and others want to discuss and share information about specific Git features, please do it in a new forum thread. There is a danger this "TestAll" thread will become a yet another Git tutorial.
Hi Juha I am sorry for diverting from the initial subject of this thread. My sincere apologies. Maybe we can move this to a new thread just like how you did with my initial query on the mailing list?
Possibly from the point where KodeZwerg says..

Is there a manual that explains me how to install that "/branches" on my windows machine please?
I would have done this already but thought it would be best to ask you and others first.



Title: Re: "TestAll" and other removed example projects
Post by: JuhaManninen on December 03, 2022, 07:55:13 pm
I would have done this already but thought it would be best to ask you and others first.
Just create a new forum thread for Git related questions and there you go.

Back to the "TestAll" project:
I realized it had been been fixed and improved in "main" before it was removed.
It means its latest version from "main" should be used instead of a version from a released Lazarus.
Title: Re: "TestAll" and other removed example projects
Post by: dbannon on December 03, 2022, 10:36:34 pm
And if you need to make or edit the example metadata file for TestAll, look at this https://github.com/davidbannon/ExampleMetaData

While JSON is certainly human readable, I don't believe its quite so human writable.

Davo
TinyPortal © 2005-2018