Recent

Author Topic: Information & Documentation on Sparta packages  (Read 10670 times)

jc99

  • Hero Member
  • *****
  • Posts: 553
    • My private Site
Information & Documentation on Sparta packages
« on: June 09, 2017, 04:58:00 pm »
Hi everybody,
Since now 4(5) Sparta packages are in the Release-candidate of 1.8 i thought it's time to ask for some information, documentation and examples for these packages.
The Author is known here as  8) hnb.  O:-)

Since 1.6 (release) there is the
Sparta_DockedFormEditor that works like the (not so) new Delphi-Form-Editor.
Whenever there there is a Form-File in the editor you have a 2 tabs in the bottom to switch to Form-Designer and back to the Code-View.
You get the biggest advantage of this editor when you use it together with anchor-docking. 

New in 1.8 (i think)  is the
Sparta_SmartFormEditor that looks a little bit like the S_DockedFormEditor.
But also shows the Form-Frame of the window and also includes a Button that shows the Component-Tab on request on the top of the Form-Designer.
There will be a fast editor for form icons/border styles. Not usable(according to hnb)/finished yet.
But despite the actual building stage it looks very promising.

New in 1.8 is also the:
Sparta_MDI - Package
(no Information here) I think it is some sort of Multi-Document-Interface - Implementation (even if target widget doesn't supports MDI).
Quote from: hnb
It is basing on code form Sparta_DockedFormEditor. Not usable/finished yet.

Then there is:
Sparta_toolsapi
(no Information either) Some sort of API for Sparta tools
Quote from: hnb
compatible interface with Delphi Open Tools API. Will be renamed. Not usable/finished yet.

Last but not least the:
Sparta_generics
That one will be part of FPC-rtl as rtl-generics one day.
The good thing is, it comes with examples:
at <LazDir>\components\sparta\generics\examples there are several:
all work except the THashMapCaseInsensitive. (and they work (and don't work) with rtl & sparta - generics.) So looking into them gives you a head-start for the time when it's released.
My version of these examples are here:
    https://github.com/joecare99/Public/tree/master/Examples/Source/Sparta * (the units)
and https://github.com/joecare99/Public/tree/master/Examples/FPC T*.lp* (The Project-files)
and https://github.com/joecare99/Public/tree/master/Examples Sparta_ex.lpg (The Project-Group)
... it comes with a Project-Group where all examples are bound together in one group.
Quote from: hnb
rtl-generics (temporary added to Lazarus as sparta_generics package) is very stable. Generally compiler have ugly bug for "class var" (without simple workaround, so I can't fix this directly in rtl-generics):

https://bugs.freepascal.org/view.php?id=30433
https://bugs.freepascal.org/view.php?id=28911

(I am not the author, of those packages, so bug-reports are welcome but remember to also report to mantis ..)
You may also have a look into http://newpascal.org/assets/modern_pascal_introduction.html which is a very brief documentation about Modern Pascal from the same author.

If you have any information/documentation/examples about those packages, please write here.
I'll try to update this first entry accordingly, and also use this as a template for a wiki (later).
 
« Last Edit: June 14, 2017, 02:29:13 pm by jc99 »
OS: Win XP x64, Win 7, Win 7 x64, Win 10, Win 10 x64, Suse Linux 13.2
Laz: 1.4 - 1.8.4, 2.0
https://github.com/joecare99/public
'~|    /''
,_|oe \_,are
If you want to do something for the environment: Twitter: #reduceCO2 or
https://www.betterplace.me/klimawandel-stoppen-co-ueber-preis-reduzieren

jc99

  • Hero Member
  • *****
  • Posts: 553
    • My private Site
Re: Information & Documentation on Sparta packages
« Reply #1 on: June 12, 2017, 06:02:56 pm »
Update :
Added Sparta_generics
OS: Win XP x64, Win 7, Win 7 x64, Win 10, Win 10 x64, Suse Linux 13.2
Laz: 1.4 - 1.8.4, 2.0
https://github.com/joecare99/public
'~|    /''
,_|oe \_,are
If you want to do something for the environment: Twitter: #reduceCO2 or
https://www.betterplace.me/klimawandel-stoppen-co-ueber-preis-reduzieren

hnb

  • Sr. Member
  • ****
  • Posts: 270
Re: Information & Documentation on Sparta packages
« Reply #2 on: June 13, 2017, 08:32:47 am »
I am the author of these packages so probably I can give some details ;)

Since 1.6 (release) there is the
Sparta_DockedFormEditor that works like the (not so) new Delphi-Form-Editor.
Whenever there there is a Form-File in the editor you have a 2 tabs in the bottom to switch to Form-Designer and back to the Code-View.
You get the biggest advantage of this editor when you use it together with anchor-docking. 

true.

New in 1.8 (i think)  is the
Sparta_SmartFormEditor that looks a little bit like the S_DockedFormEditor.
But also shows the Form-Frame of the window and also includes a Button that shows the Component-Tab on request on the top of the Form-Designer.

+fast editor for form icons/border styles. Not usable/finished yet.

New in 1.8 is also the:
Sparta_MDI - Package
(no Information here) I think it is some sort of Multi-Document-Interface - Implementation

it is supposed to be multi-platform Multi-Document-Interface (even if target widget doesn't supports MDI). It is basing on code form Sparta_DockedFormEditor. Not usable/finished yet.

Then there is:
Sparta_toolsapi
(no Information either) Some sort of API for Sparta tools

compatible interface with Delphi Open Tools API. Will be renamed. Not usable/finished yet.

Last but not least the:
Sparta_generics
That one will be part of FPC-rtl as rtl-generics one day.
The good thing is, it comes with examples:
at <LazDir>\components\sparta\generics\examples there are several:
all work except the THashMapCaseInsensitive. (and they work (and don't work) with rtl & sparta - generics.) So you don't waste you time looking into them.

rtl-generics (temporary added to Lazarus as sparta_generics package) is very stable. Generally compiler have ugly bug for "class var" (without simple workaround, so I can't fix this directly in rtl-generics):

https://bugs.freepascal.org/view.php?id=30433
https://bugs.freepascal.org/view.php?id=28911
« Last Edit: June 13, 2017, 08:35:52 am by hnb »
Checkout NewPascal initiative and donate beer - ready to use tuned FPC compiler + Lazarus for mORMot project

best regards,
Maciej Izak

hnb

  • Sr. Member
  • ****
  • Posts: 270
Re: Information & Documentation on Sparta packages
« Reply #3 on: June 13, 2017, 10:48:32 am »
Development packages sparta_smartformeditor, sparta_toolsapi and sparta_mdi are now removed from fixes.
Checkout NewPascal initiative and donate beer - ready to use tuned FPC compiler + Lazarus for mORMot project

best regards,
Maciej Izak

jc99

  • Hero Member
  • *****
  • Posts: 553
    • My private Site
Re: Information & Documentation on Sparta packages
« Reply #4 on: June 14, 2017, 02:04:15 pm »
Thanks hnb, I very much appreciate your work ! (BIG THUMB UP)
You are really my hero and I am using he Sparta-Docked form Editor very much. This together with Anchordocking was a BIG boost for Lazarus in my opinion.
And also thanks for your information here.
I am really looking forward when the MDI and The Smart-Form-Editor are working.
If you have time could you throw in some exampes for The Tools-Api and how the MDI are supposed to work ?

 
OS: Win XP x64, Win 7, Win 7 x64, Win 10, Win 10 x64, Suse Linux 13.2
Laz: 1.4 - 1.8.4, 2.0
https://github.com/joecare99/public
'~|    /''
,_|oe \_,are
If you want to do something for the environment: Twitter: #reduceCO2 or
https://www.betterplace.me/klimawandel-stoppen-co-ueber-preis-reduzieren

jc99

  • Hero Member
  • *****
  • Posts: 553
    • My private Site
Re: Information & Documentation on Sparta packages
« Reply #5 on: June 14, 2017, 02:30:29 pm »
Update: inserted the quotes from hnb
OS: Win XP x64, Win 7, Win 7 x64, Win 10, Win 10 x64, Suse Linux 13.2
Laz: 1.4 - 1.8.4, 2.0
https://github.com/joecare99/public
'~|    /''
,_|oe \_,are
If you want to do something for the environment: Twitter: #reduceCO2 or
https://www.betterplace.me/klimawandel-stoppen-co-ueber-preis-reduzieren

hnb

  • Sr. Member
  • ****
  • Posts: 270
Re: Information & Documentation on Sparta packages
« Reply #6 on: June 14, 2017, 08:48:47 pm »
If you have time could you throw in some exampes for The Tools-Api and how the MDI are supposed to work ?

ToolsAPI is in very early stage so I cant provide any example. MDI has at the moment universal/reusable parts moved from Sparta_DockedFormEditor I will provide basic example soon on the Lazarus trunk.
Checkout NewPascal initiative and donate beer - ready to use tuned FPC compiler + Lazarus for mORMot project

best regards,
Maciej Izak

jc99

  • Hero Member
  • *****
  • Posts: 553
    • My private Site
Re: Information & Documentation on Sparta packages
« Reply #7 on: June 15, 2017, 06:09:23 pm »
When talking about MDI: Have a look at:
https://bugs.freepascal.org/view.php?id=31924
in the patch is the lMDI-Package that was formerly part of Multidoc .(The previous MDI-Implementation)
« Last Edit: June 15, 2017, 06:11:42 pm by jc99 »
OS: Win XP x64, Win 7, Win 7 x64, Win 10, Win 10 x64, Suse Linux 13.2
Laz: 1.4 - 1.8.4, 2.0
https://github.com/joecare99/public
'~|    /''
,_|oe \_,are
If you want to do something for the environment: Twitter: #reduceCO2 or
https://www.betterplace.me/klimawandel-stoppen-co-ueber-preis-reduzieren

JuhaManninen

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4459
  • I like bugs.
Re: Information & Documentation on Sparta packages
« Reply #8 on: June 15, 2017, 07:30:14 pm »
When talking about MDI: Have a look at:
https://bugs.freepascal.org/view.php?id=31924
in the patch is the lMDI-Package that was formerly part of Multidoc .(The previous MDI-Implementation)
Why so many MDI solutions are needed? LCL also has its own solution.
What is the purpose of the "Found LMDI-Package" bug report for "Lazarus CCR" project? Is the idea to commit it to CCR? No, usually package authors / maintainers commit code themselves. Commit rights for CCR can be obtained by asking for them, which implies a promise to maintain the code for a reasonable time in future.
Yes, many CCR package maintainers have fleed which is a problem.
Mostly Lazarus trunk and FPC 3.2 on Manjaro Linux 64-bit.

jc99

  • Hero Member
  • *****
  • Posts: 553
    • My private Site
Re: Information & Documentation on Sparta packages
« Reply #9 on: June 16, 2017, 02:11:59 am »
Why so many MDI solutions are needed? LCL also has its own solution.
I think it's only because it' so well documented.  :-X
What do you mean by LCL has it's own solution, the roadmap says that it's only working with qt (last time I checked).
Are there any examples ? Documents ?

The same counts for net & Sockets... the FCL-solution partly only runs in linux because it uses fpasync.
 so we have lNet, synapse, Indy, ... and many more

The FCL has so many good things, but with the lack of documentation and integration to Lazarus they are so rarely used.

I fully agree with you, it's really not good to reinvent the wheel. But if you don't know about it ...
(And then you get stuck because you can't figure out which color to use ... (Douglas Adams O:-) ) )
So if you or someone else could give some advise, I volunteer to write the Wiki.
OS: Win XP x64, Win 7, Win 7 x64, Win 10, Win 10 x64, Suse Linux 13.2
Laz: 1.4 - 1.8.4, 2.0
https://github.com/joecare99/public
'~|    /''
,_|oe \_,are
If you want to do something for the environment: Twitter: #reduceCO2 or
https://www.betterplace.me/klimawandel-stoppen-co-ueber-preis-reduzieren

PeterX

  • Sr. Member
  • ****
  • Posts: 404
Re: Information & Documentation on Sparta packages
« Reply #10 on: January 06, 2018, 11:29:32 pm »
Why so many MDI solutions are needed? LCL also has its own solution.
Laz' MDI still does not work at all under Win32 .. my (previously Delphi5 -) project still suffers from that.
usually using latest Lazarus release version with Windows 10

jpablogn

  • Newbie
  • Posts: 2
Re: Information & Documentation on Sparta packages
« Reply #11 on: December 20, 2023, 11:01:51 am »
Sorry, how can I install this package?
I have a folder lazarus/components/sparta/generics but I cannot install de component from the Lazarus packages installer form.
I can see in the installer form: sparta_dockedformeditor, sparta_mdi, but not sparta_generics (even when I have the directory lazarus/components/sparta/generics).
Thank you

jpablogn

  • Newbie
  • Posts: 2
Re: Information & Documentation on Sparta packages
« Reply #12 on: December 20, 2023, 11:18:01 am »
1. I downloaded the .zip from here https://github.com/maciej-izak/generics.collections
2. I unzipped in c:/temporal
3. And from the comand line in that path I did: "fpc fpmake.pp" which generates "fpmake.exe"
4. Double click on fpmake.exe

It seems like this is installing the component on lazarus/components/sparta/generics but you cannot access it from Lazarus Packages Installer form.

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 9792
  • Debugger - SynEdit - and more
    • wiki
Re: Information & Documentation on Sparta packages
« Reply #13 on: December 20, 2023, 11:38:52 am »
you cannot access it from Lazarus Packages Installer form.

I don't know about Sparta.

But, the "Install Packages" from the package menu, only lists packages that came with the Lazarus installer (to be exact: have an lpl file in a specific folder in the installation).
The "Install Packages" does NOT search the entire lazarus directory.

3rd party packages are usually installed by
- opening the package (lpi file)
- use the "Use" toolbutton (dropdown), and select "Install"
- follow the steps. rebuild the IDE (if it is an design time package)

For none design time package, just add it to your project. It does not need install into the IDE. (the IDE will know it once it was opened the first time)

If the package you have is compatible with the Lazarus version you have, then that should be it.

Thaddy

  • Hero Member
  • *****
  • Posts: 14201
  • Probably until I exterminate Putin.
Re: Information & Documentation on Sparta packages
« Reply #14 on: December 20, 2023, 01:41:17 pm »
FYI
Sparta is more or less the ancestor to rtl-generics and some other stuff that Maciej Izak contributed, like anchor docking. So basically you do not need to install it because you just install buggier and duplicate functionality. It is NOT recommended to install it, except for 3.0.4 or earlier. Basically for people living in a cave for the past 5 years.
Higher versions of FreePascal and Lazarus already have that code.
To be more precise, rtl-generics is now part of the standard RTL and Anchor-docking can be optionally installed in Lazarus.
« Last Edit: December 20, 2023, 01:48:30 pm by Thaddy »
Specialize a type, not a var.

 

TinyPortal © 2005-2018