Re: [Lazarus] It is a beautiful day...

2019-08-11 Thread Ondrej Pokorny via lazarus

On 11.08.2019 13:12, Mattias Gaertner via lazarus wrote:

On Sun, 11 Aug 2019 12:54:48 +0200
Ondrej Pokorny via lazarus  wrote:


The issue is that the new format is done with forwards-compatibility
so that people can decide if they want to open the new file in an
older Lazarus version. (The projects have the "Maximize compatibility
of project files" option for this.)

That an old Lazarus cannot read completely the new format is an
incompatibility I can live with, if it is documented.


Thanks, I'll come up with a patch.

Best
Ondrej

--
___
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] getlazarus.org search request

2019-08-11 Thread Anthony Walter via lazarus
Ryan,

My sites are built on my custom web class library that optionally uses
templates to generate content. Templates are simple fill in the blank page
type text files which use reflection to pull properties of a objects into
the template.

Here is how a template is formatted:



Search Results: {Phrase}



{SearchItems}



And a template file for the search item:


{Bolden}
{Kind}
{Description}

If you want something specific with regards to layout, just send me a
custom template and possibly a css file to make it look however you want.

Since I have written this web library myself, its very easy to modify and
extend. I might add the ability for anyone to send their own templates and
browse or select from templates directly on every page, but that extension
is not likely to happen in the next few days.

If anyone is interested let me know and I'd produce a short instructional
video on how the my web library makes developing web pages easy. The only
hard part is writing html and css, which for plain stuff isn't hard at all
really. But html and css are design work, so you get out of html and css
work is whatever kind of design, taste, and effort you put into it.
-- 
___
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] getlazarus.org search request

2019-08-11 Thread Ryan Joseph via lazarus


> On Aug 11, 2019, at 1:51 PM, Anthony Walter via lazarus 
>  wrote:
> 
> Currently there is no custom formatting applied as this is meant to be an 
> AJAX request to create populate suggestions. As this is an API like RESTful 
> function is this good enough for you or do want a "pretty" result format?
> 

Making a pretty formatted option would be nice also actually. It’s already 
basically there but a few line breaks would make it more useable. :)

Regards,
Ryan Joseph

-- 
___
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] getlazarus.org search request

2019-08-11 Thread Ryan Joseph via lazarus


> On Aug 11, 2019, at 1:51 PM, Anthony Walter via lazarus 
>  wrote:
> 
> Ryan,
> 
> I was going to modify my project to allow for RESTful queries, when I 
> realized it already does this. The url and format are as follows:
> 
> https://docs.getlazarus.org/?method=codesearch=TStringList

Excellent, thanks for your foresight :). Could it be adapted so that there’s an 
option to show the page of the top result? For example in the query above a 
list of links is displayed but it would be better if the top result 
(https://docs.getlazarus.org/#rtl+classes+tstringlist) was loaded 
automatically. The fact that “TStringList” shows the correct page as the best 
result means this will work for 99% of the use cases I have in mind.

Regards,
Ryan Joseph

-- 
___
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] Running using lazbuild

2019-08-11 Thread Ryan Joseph via lazarus


> On Aug 11, 2019, at 2:44 PM, Ryan Joseph  wrote:
> 
> Great, that worked. Why didn’t lazbuild do this automatically? As I said I 
> wanted to integrate into my editor but if I need to add extra flags that 
> greatly complicates things for me.

Btw, here is the widget set option in the .lpi file. Lazbuild doesn’t seem to 
respect it for some reason though. I’m happy to file a bug report if need be.


  
  

  



Regards,
Ryan Joseph

-- 
___
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] Running using lazbuild

2019-08-11 Thread Ryan Joseph via lazarus


> On Aug 11, 2019, at 2:40 PM, Mattias Gaertner via lazarus 
>  wrote:
> 
> Try building with 
> lazbuild --widgetset=cocoa

Great, that worked. Why didn’t lazbuild do this automatically? As I said I 
wanted to integrate into my editor but if I need to add extra flags that 
greatly complicates things for me.

Regards,
Ryan Joseph

-- 
___
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] Running using lazbuild

2019-08-11 Thread Mattias Gaertner via lazarus
On Sun, 11 Aug 2019 14:22:35 -0600
Ryan Joseph via lazarus  wrote:

> > On Aug 11, 2019, at 2:09 PM, Martin Frb via lazarus
> >  wrote:
> > 
> > Looks like it did not pick up the widgetset. But it did pick up
> > cpu=64bit.
> > 
> > So it attempts carbon for 64 bit, which gives the error.  
> 
> Is this a lazbuild bug that could be fixed? I wanted to integrate
> lazbuild into my editor but this is a deal breaker for me.

Try building with 
lazbuild --widgetset=cocoa

Mattias
-- 
___
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] Running using lazbuild

2019-08-11 Thread Ryan Joseph via lazarus


> On Aug 11, 2019, at 2:09 PM, Martin Frb via lazarus 
>  wrote:
> 
> Looks like it did not pick up the widgetset. But it did pick up cpu=64bit.
> 
> So it attempts carbon for 64 bit, which gives the error.

Is this a lazbuild bug that could be fixed? I wanted to integrate lazbuild into 
my editor but this is a deal breaker for me.

Regards,
Ryan Joseph

-- 
___
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] Running using lazbuild

2019-08-11 Thread Martin Frb via lazarus

On 11/08/2019 20:29, Ryan Joseph via lazarus wrote:
Hint: (lazarus) Missing state file of python4lazarus_package 1.0: 
/Users/ryanjoseph/Desktop/laz_tests/Python-for-Lazarus/python4lazarus/lib/x86_64-darwin/python4lazarus_package.compiled 


Hint: (11030) Start of reading config file /etc/fpc.cfg
Hint: (11031) End of reading config file /etc/fpc.cfg
Free Pascal Compiler version 3.0.4 [2018/09/30] for x86_64
Copyright (c) 1993-2017 by Florian Klaempfl and others
(1002) Target OS: Darwin for x86_64
(3104) Compiling lcl.pas
(3104) Compiling ./carbon/alllclintfunits.pas
(3104) Compiling ./carbon/carbonbars.pp
/Users/ryanjoseph/Desktop/laz_tests/lazarus/lcl/interfaces/./carbon/carbonbars.pp(16,2)
 Error: (2023) User defined: only cpu i386 is supported



Looks like it did not pick up the widgetset. But it did pick up cpu=64bit.

So it attempts carbon for 64 bit, which gives the error.

--
___
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] getlazarus.org search request

2019-08-11 Thread Anthony Walter via lazarus
Ryan,

I was going to modify my project to allow for RESTful queries, when I
realized it already does this. The url and format are as follows:

https://docs.getlazarus.org/?method=codesearch=TStringList

Alternate request for xml format:

https://docs.getlazarus.org/?method=codesearch=xml=TStringList

Currently there is no custom formatting applied as this is meant to be an
AJAX request to create populate suggestions. As this is an API like RESTful
function is this good enough for you or do want a "pretty" result format?

Here are the templates, which I could easy swap out based on another
request parameter:

Page uses this template as an html fragment:

{SearchItems}

Results collection uses this template:


{Bolden}
{Kind}
{Description}

-- 
___
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] Running using lazbuild

2019-08-11 Thread Ryan Joseph via lazarus


> On Aug 11, 2019, at 11:48 AM, Juha Manninen via lazarus 
>  wrote:
> 
> On Wed, Jul 24, 2019 at 7:33 PM Ryan Joseph via lazarus
>  wrote:
>> Can the “lazbuild” tool be used to run a project exactly like if I press the 
>> run button in Lazarus?
>> I have project which runs in Lazarus but doing “lazbuild project.lpi” gives 
>> me errors suggesting it didn’t do exactly the same thing.
> 
> LazBuild does not run a project but it should build it the same way
> that Lazarus IDE does.
> What kind of errors did you get?

Thanks for replying. Here’s the output I get. Pressing build in Lazarus doesn’t 
give this error. I think the wrong widget set is being used but I shouldn’t 
need to setting anything because all the information in the project is already 
set in the project file I thought.

You can test with the git project: https://github.com/neurolabusc/MRIcroGL



Ryans-MacBook-Pro-2:MRIcroGL12 ryanjoseph$ lazbuild MRIcroGL.lpr
Hint: (lazarus) Last compile was incomplete for LCL 2.1
  State 
file="/Users/ryanjoseph/Desktop/laz_tests/lazarus/lcl/units/x86_64-darwin/carbon/LCL.compiled"
Hint: (lazarus) Missing state file of LazOpenGLContext 0.0.1: 
/Users/ryanjoseph/Desktop/laz_tests/lazarus/components/opengl/lib/x86_64-darwin/carbon/LazOpenGLContext.compiled
Hint: (lazarus) Missing state file of python4lazarus_package 1.0: 
/Users/ryanjoseph/Desktop/laz_tests/Python-for-Lazarus/python4lazarus/lib/x86_64-darwin/python4lazarus_package.compiled
Hint: (11030) Start of reading config file /etc/fpc.cfg
Hint: (11031) End of reading config file /etc/fpc.cfg
Free Pascal Compiler version 3.0.4 [2018/09/30] for x86_64
Copyright (c) 1993-2017 by Florian Klaempfl and others
(1002) Target OS: Darwin for x86_64
(3104) Compiling lcl.pas
(3104) Compiling ./carbon/alllclintfunits.pas
(3104) Compiling ./carbon/carbonbars.pp
/Users/ryanjoseph/Desktop/laz_tests/lazarus/lcl/interfaces/./carbon/carbonbars.pp(16,2)
 Error: (2023) User defined: only cpu i386 is supported
(3104) Compiling ./carbon/carbonprivate.pp
(3104) Compiling ./carbon/carbondef.pp
/Users/ryanjoseph/Desktop/laz_tests/lazarus/lcl/interfaces/./carbon/carbondef.pp(187,1)
 Fatal: (10026) There were 1 errors compiling module, stopping
Fatal: (1018) Compilation aborted
Error: /usr/local/bin/ppcx64 returned an error exitcode
Error: (lazarus) Compile package LCL 2.1: stopped with exit code 1
Error: (lazarus) [TLazPackageGraph.CompileRequiredPackages] "Exit code 1"
Error: (lazbuild) Project dependencies of 
/Users/ryanjoseph/Desktop/Work/MRIcroGL12/MRIcroGL.lpi
Ryans-MacBook-Pro-2:MRIcroGL12 ryanjoseph$ 


Regards,
Ryan Joseph

-- 
___
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] Running using lazbuild

2019-08-11 Thread Juha Manninen via lazarus
On Wed, Jul 24, 2019 at 7:33 PM Ryan Joseph via lazarus
 wrote:
> Can the “lazbuild” tool be used to run a project exactly like if I press the 
> run button in Lazarus?
> I have project which runs in Lazarus but doing “lazbuild project.lpi” gives 
> me errors suggesting it didn’t do exactly the same thing.

LazBuild does not run a project but it should build it the same way
that Lazarus IDE does.
What kind of errors did you get?

Juha
-- 
___
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


[Lazarus] TextHint for TCombobox?

2019-08-11 Thread Alexey Tor. via lazarus
I see that TextHint works for Edit/Memo - but its not supported for 
Combobox (in editable style).


Can you add?

--
Regards,
Alexey

--
___
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] I found an AnchorDockingDsgn package bug?

2019-08-11 Thread Juha Manninen via lazarus
On Mon, Jun 17, 2019 at 12:43 AM Michael W. Vogel via lazarus
 wrote:
> Can you please open a bug report on Mantis?!

There is one opened by Andrew Zenin.
 https://bugs.freepascal.org/view.php?id=35242

Regards,
Juha

P.S.
Sorry for answering an old post. I am reading them now after a pause.
-- 
___
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] SynEdit.TextBetweenPoints (Martin?)

2019-08-11 Thread Bart via lazarus
On Sun, Aug 11, 2019 at 4:33 PM Martin Frb via lazarus
 wrote:

> SynEdit1.BeginUpdate(); / EndUpdate

Thanks.
Should have figured that out myself, shouldn't I ;-)

-- 
Bart
-- 
___
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] SynEdit.TextBetweenPoints (Martin?)

2019-08-11 Thread Martin Frb via lazarus

On 11/08/2019 15:41, Bart via lazarus wrote:


One more question:
The current solution creates 2 "redo" points.
I have to press ^Z 2 times to undo the process.
Is there a way to make it so that the whole process can be undone in
one step (by invoking the default undo-mechanism of TSynEdit)?



SynEdit1.BeginUpdate(); / EndUpdate

or BeginUndoBlock.
--
___
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] SynEdit.TextBetweenPoints (Martin?)

2019-08-11 Thread Bart via lazarus
Hi,

In my real app I don't have persistent blocks, so that should not be a problem.

> BlockBegin/BlockEnd are faster than SelStart/SelEnd.
> BlockBegin/End and SetTextBetweenPoints are comparable.

Speed is not of concern in my use case. The computer will always be
faster than any human typing in my editor ;-)
My old code uses SelStart etc (ported form a Delphi 3 app), but then I
could not get it to work properly if the selection spanned multiple
lines.
You then suggested I'lld use SetTextBetweenPoints.
This did not have that drawback.

> But SetTextBetweenPoints should be less work to use.
Apparently not for me 

IIRC then at some point in time I ran into problems (probably related
to new SetTextBetweenPoints API ???) with backwards blocks and empty
blocks.
Since my app is mostly private for me (I create all my htm pages with
it and use it instead of notepad whenever possible), I did not bother
too much.
However I seem to have a habit of selecting text from right to left,
so the bug triggered more often then not.
Once I was frustrated enough with it I investigated again and asked
for your help (again).
ATM I have it working, for which I thank you.
In my app, I solve the Lines.Count = 0 situation by simply adding an empty line.
This makes sense, in the way that the function will always insert text
in the editor, so linecount would have been altered in that case
anyway.

One more question:
The current solution creates 2 "redo" points.
I have to press ^Z 2 times to undo the process.
Is there a way to make it so that the whole process can be undone in
one step (by invoking the default undo-mechanism of TSynEdit)?

Again, thanks for your help.

Bart
-- 
___
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


[Lazarus] fpreport: Rendering Report to Printer did not work on RasPi (arm-linux)

2019-08-11 Thread Andreas Frieß via lazarus

I have created a report with fpreport (in code) and it works on Windows
(32-bit app) with Rendering to LCLCanvas, PDF  and Printer without problems.

On a RasPi with rasbian (on Jessy, Wheezy the same) rendering to
LCLCanvas and PDF works, but on printer it shows not the text. pictures
are correct rendered. The text is not rendered or only some points,
except the footerband.  It looks in some test like the drawn text is
overwritten.

I have dived a little into fpreport and found out, it must have to do
with Canvas.Textout in TFPReportExportCanvas.RenderMemo. The parameters
of Canvas.TextOut are imho correct, but not the rendered result. If i
change Canvas.TextOut to Canvas.TextRect (as in designmode) and use the
same parameters, the text is written to the printer, it looks like
something goes wrong on arm-linux with Canvas.TextOut.

I am using fpc fixes32 (42593) and Laz Fixes20 (61645) and tested with
Lazarus 2.1.0 r61504:61683M FPC 3.3.1 i386-win32-win32/win64 (42644) too

I have post this on the freepascalforum
https://forum.lazarus.freepascal.org/index.php/topic,46343.msg329973.html#msg329973
with an adapted sample of the fpreport-excample from Lazarus.

Regards

Andi

--
___
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] SynEdit.TextBetweenPoints (Martin?)

2019-08-11 Thread Martin Frb via lazarus

On 11/08/2019 13:21, Bart via lazarus wrote:



  SetTextBetweenPoints(BB, BB, Pre, [setMoveBlock], scamAdjust,
smaMoveUp, smNormal);
// scamAdjust => Move the caret with the block.
  BE := BlockEnd;
  SetTextBetweenPoints(BE, BE, Post, [setMoveBlock], scamIgnore,
smaMoveUp, smNormal);
// setMoveBlock for the 2nd call,  is to KEEP the selection as it is.
So to keep caret => scamIgnore

Yes, this seems to work OK, even when Lines.Count = 0.

So, now I need to $ifdef my workaround for Lazarus 2.0.
What ifdef to use?

{$IF LCL_FullVersion < 201}

This does not work for smColumn mode. Even if the column only has a 
single line. But trying to do a {} around a column selection is of 
limited use anyway. It would only add on opening on the very first line, 
and a closing on the very last line.



Btw, I have not tested that code for persistent selections.

It relies on that the 2nd  SetTextBetweenPoints does not move the caret 
(that will be the same with persistent selection)
and that if the block had been moved (in case of on empty selection), 
the caret will reset the block.


That is because the selection must end (or begin) at the caret. Which is 
not the case after the empty selection did move.
A persistent selection does not need to end at the caret. So I do not 
know if it will be reset. (Maybe it does, maybe not)


If it is not, then it will still at first look ok: selection still 
empty, and caret at correct location.
But this may affect how ctrl-K,B / ctrl-K,k  (IIRC) work. That is, if 
you set the block-end, the begin (even though empty) may have been moved.


Hovewer come to think of it:
Unless the selection begin has just been set, the begin of a persistent 
selection is not at the caret. So using BlockBegin/End for an empty 
persistent selection will not get you what you want.
So if there is no selection (and if persistent selection could be 
enabled) then (not tested) something like this may help


If not SelAvail then begin
   p := LogicalCaretPos;
   f :=    BlockBegin = p;
   SetTextBetweenPoints(p, p, Post, [setMoveBlock], 
scamIgnore,smaMoveUp, smNormal);
   SetTextBetweenPoints(p, p, Pre, [setMoveBlock], 
scamAdjust,smaMoveUp, smNormal);

   if f then BlockBegin := p;
end
else
  // the other code

Selection will be moved, if it is not at the caret pos.
Otherwise
- insert the end "}" first, but do not move caret.
- insert begin (will insert before end, because caret did not move),
    will move the caret (so it is after "{"), and will reset selection 
to be empty at caret

- reset empty selection to caret.


Also  SelEnd / SelStart are really slow (they have to iterate over all
lines up to the selection, each time you call them. SynEdit operates
with x/y locations.

I know, see the diff in
https://sourceforge.net/p/flyingsheep/code/324/tree//trunk/EPlus/editorpagecontrol.pp?diff=4faa6364b9363c207f000850:323

+  //Using SetTextBetweenPoints is faster (and according to Martin
Friebe) more reliable

BlockBegin/BlockEnd are faster than SelStart/SelEnd.

BlockBegin/End and SetTextBetweenPoints are comparable.
But SetTextBetweenPoints should be less work to use.


That code was by you, so you got me into this mess in the first place :-)


In that case sorry.
--
___
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] SynEdit.TextBetweenPoints (Martin?)

2019-08-11 Thread Bart via lazarus
On Sun, Aug 11, 2019 at 12:46 AM Martin Frb via lazarus
 wrote:

> This should be all you need. Caret, Selection and IsBackwardSel are all kept
>
...
>  SetTextBetweenPoints(BB, BB, Pre, [setMoveBlock], scamAdjust,
> smaMoveUp, smNormal);
>// scamAdjust => Move the caret with the block.
>  BE := BlockEnd;
>  SetTextBetweenPoints(BE, BE, Post, [setMoveBlock], scamIgnore,
> smaMoveUp, smNormal);
>// setMoveBlock for the 2nd call,  is to KEEP the selection as it is.
> So to keep caret => scamIgnore

Yes, this seems to work OK, even when Lines.Count = 0.

So, now I need to $ifdef my workaround for Lazarus 2.0.
What ifdef to use?

> Also  SelEnd / SelStart are really slow (they have to iterate over all
> lines up to the selection, each time you call them. SynEdit operates
> with x/y locations.

I know, see the diff in
https://sourceforge.net/p/flyingsheep/code/324/tree//trunk/EPlus/editorpagecontrol.pp?diff=4faa6364b9363c207f000850:323

+  //Using SetTextBetweenPoints is faster (and according to Martin
Friebe) more reliable
+  //than using SelStart and SelLength (like the old code did)

That code was by you, so you got me into this mess in the first place :-)

-- 
Bart
-- 
___
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] It is a beautiful day...

2019-08-11 Thread Mattias Gaertner via lazarus
On Sun, 11 Aug 2019 12:54:48 +0200
Ondrej Pokorny via lazarus  wrote:

> On 11.08.2019 12:23, Mattias Gaertner via lazarus wrote:
> >> I suggest to fix the old file format without
> >> backwards-compatibility: 
> >>     
> >>     
> >>       
> >>
> >> That would mean that the Compile flags for build modes get lost and
> >> the user must set them again. Are you fine with it? (Well, I am
> >> fine with that.)  
> > I guess with a few lines of code you can read the old format and set
> > the "Compile" flag.  
> 
> The issue is that the new format is done with forwards-compatibility
> so that people can decide if they want to open the new file in an
> older Lazarus version. (The projects have the "Maximize compatibility
> of project files" option for this.)

That an old Lazarus cannot read completely the new format is an
incompatibility I can live with, if it is documented.

Mattias
-- 
___
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] It is a beautiful day...

2019-08-11 Thread Ondrej Pokorny via lazarus

On 11.08.2019 12:23, Mattias Gaertner via lazarus wrote:

I suggest to fix the old file format without backwards-compatibility:
      
    
    
      

That would mean that the Compile flags for build modes get lost and
the user must set them again. Are you fine with it? (Well, I am fine
with that.)

I guess with a few lines of code you can read the old format and set
the "Compile" flag.


The issue is that the new format is done with forwards-compatibility so 
that people can decide if they want to open the new file in an older 
Lazarus version. (The projects have the "Maximize compatibility of 
project files" option for this.)


Is this important to you?

Ondrej

--
___
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] It is a beautiful day...

2019-08-11 Thread Graeme Geldenhuys via lazarus
On 11/08/2019 10:56 am, Ondrej Pokorny via lazarus wrote:
> I found out that the XML format is unusual (wrong).

Fully agree. That is so INI-ish, and really not needed in XML or JSON
formats.

> I ask because I wanted to update the file format to the new Lazarus XML 
> format (without the indexes and count attributes):
> 
> 
> 
>    
>      
>    
>      
>        
>        
>      
>    


Looks much better! I vote for this.

I would also recommend the idea of considering JSON format, which is
less verbose, has real data types (boolean, int, float, etc - not
everything is a string value), thus making it more expressive.



Regards,
  Graeme

-- 
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/

My public PGP key:  http://tinyurl.com/graeme-pgp
-- 
___
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] It is a beautiful day...

2019-08-11 Thread Mattias Gaertner via lazarus
On Sun, 11 Aug 2019 11:56:38 +0200
Ondrej Pokorny via lazarus  wrote:

> On 11.07.2019 17:46, Michael Van Canneyt via lazarus wrote:
> > The IDE now has proper support for Project groups.  
> 
> Hello,
> 
> I started to use Project groups and also added the .lpg file to my 
> repository. I found out that the XML format is unusual (wrong). The 
>  nodes are not subnodes to :
> 
> 
> 
>    
>      
>    
>      
>      
>      
>    
> 
> Is this an intention?

No

 
> I ask because I wanted to update the file format to the new Lazarus
> XML format (without the indexes and count attributes):
> 
> 
> 
>    
>      
>    
>      
>        
>        
>      
>    
> 
> and I have already helper functions for distinguishing between the
> old and the new file formats but they can handle only the "correct"
> old format (where item nodes are subnodes of the main node):
>      
>        
>        
>      
> 
> My question: because Project groups are usable only in trunk,

Project groups are in 2.0.


> I suggest to fix the old file format without backwards-compatibility:
>      
>    
>    
>      
> 
> That would mean that the Compile flags for build modes get lost and
> the user must set them again. Are you fine with it? (Well, I am fine
> with that.)

I guess with a few lines of code you can read the old format and set
the "Compile" flag.

Mattias


-- 
___
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] It is a beautiful day...

2019-08-11 Thread Ondrej Pokorny via lazarus

On 11.07.2019 17:46, Michael Van Canneyt via lazarus wrote:

The IDE now has proper support for Project groups.


Hello,

I started to use Project groups and also added the .lpg file to my 
repository. I found out that the XML format is unusual (wrong). The 
 nodes are not subnodes to :




  
    
  
    
    
    
  

Is this an intention?

I ask because I wanted to update the file format to the new Lazarus XML 
format (without the indexes and count attributes):




  
    
  
    
      
      
    
  

and I have already helper functions for distinguishing between the old 
and the new file formats but they can handle only the "correct" old 
format (where item nodes are subnodes of the main node):

    
      
      
    

My question: because Project groups are usable only in trunk, I suggest 
to fix the old file format without backwards-compatibility:

    
  
  
    

That would mean that the Compile flags for build modes get lost and the 
user must set them again. Are you fine with it? (Well, I am fine with that.)


Best
Ondrej

--
___
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus