Re: [Lazarus] Package filenames with _package

2018-01-07 Thread leledumbo via Lazarus
> It is good filenames, with _package suffix, easy to see filenames from all
filenames in big dir

I don't agree, that's what file extension is for. Filtering and sorting
should easily be done to distinguish package files from others.




--
Sent from: http://free-pascal-lazarus.989080.n3.nabble.com/
-- 
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] lazarus-ccr (or other) TBufDataSet Documentation?

2018-01-07 Thread leledumbo via Lazarus
> So far I have had no success.  Do I have to use the source alone? 

I think there's none officially, but google gives me these:
-
http://wiki.lazarus.freepascal.org/How_to_write_in-memory_database_applications_in_Lazarus/FPC
- http://www.pp4s.co.uk/main/tu-db-bufdataset.html



--
Sent from: http://free-pascal-lazarus.989080.n3.nabble.com/
-- 
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] Package filenames with _package

2018-01-07 Thread Graeme Geldenhuys via Lazarus

On 2018-01-07 08:35, leledumbo via Lazarus wrote:

I don't agree, that's what file extension is for.


Fully agree.

I feel I should also add that DOS is not the mainstream OS any more like
it was in the early 90's (some 26 years ago), so why is everybody still 
limiting file extensions to 3 letters?? Some of my fpGUI included 
applications use file extensions like *.project etc. Hell, even 
Microsoft is catching up with that idea (although minor) and now use 4 
letter extensions like *.docx etc.


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] Package filenames with _package

2018-01-07 Thread Mattias Gaertner via Lazarus
On Sun, 7 Jan 2018 20:08:31 +0700
Ondrej Pokorny via Lazarus  wrote:

>[...]
> >> The package unit can have a different name as the package. See
> >> for example synedit.  
> >
> > I didn't know this, and this is good to know !  
> 
> I didn't know this either. Where can the pas file name be changed? I 
> can't find any entry in the Package Options dialog.

Right click on an unit in the package editor and set File Type to "Main
Unit". That is then the auto generated unit.

Here is how to create a new package with this:
http://wiki.freepascal.org/Lazarus_Packages#Create_a_package_with_a_unit_that_has_the_same_name_as_the_package

If you often need to create packages a custom main unit name, feel free
to create a new package type or an initial setup dialog.


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


Re: [Lazarus] Package filenames with _package

2018-01-07 Thread Martin Frb via Lazarus

On 07/01/18 14:35, Ondrej Pokorny via Lazarus wrote:

On 07.01.2018 20:29, Vojtěch Čihák via Lazarus wrote:


Hi,

click Package->New Package...

it immediately opens Save dialog, where you choose filname. It saves 
xyz.lpk


Then click Compile and xyz.pas is autogenerated.



:D

The question was: it saves xyz.lpk, where can I define that abc.pas is 
autogenerated/used for xyz.lpk instead of xyz.pas?


I think, add a unit, select it in the list, right click it, and in "file 
type" make it the "main unit"


Maybe there is an easier way

SynEditDsgn has this

the auto generated unit is allsyneditdsgn.pas

and the unit with registration is "syneditlazdsgn.pas" (see checkbox at 
the bottom of package dialog.

So this as afaik why the unit will be called from the autogenerated unit.

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


Re: [Lazarus] Package filenames with _package

2018-01-07 Thread Mattias Gaertner via Lazarus
On Sun, 7 Jan 2018 10:42:33 +0100 (CET)
Michael Van Canneyt via Lazarus  wrote:

>[...]
> The "problem" is that the pascal unit generated for a package has the
> same name as the package and often conflicts with a unit in the package. 

The package unit can have a different name as the package. See
for example synedit.

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


Re: [Lazarus] Package filenames with _package

2018-01-07 Thread AlexeyT via Lazarus


I am glad to read this, I also think the _package is completely 
redundant.


many Laz packages have suffix anyway: Dsgn, Pkg, pkg, maybe others.

--
Regards,
Alexey

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


Re: [Lazarus] GTK2/X Appcrash when TPen.Pattern has invalid value

2018-01-07 Thread Marc Weustink via Lazarus


On January 6, 2018 8:14:30 PM GMT+01:00, Alexander Hofmann via Lazarus 
 wrote:
>Dear all,
>
>I spend some time debugging a programming error (read:
>misinterpretation
>of available documentation) and though I should share my findings...
>
>I wanted to have a TChart series drawn with a dashed line, the
>pen-style
>"psDashed" had two short dashes for my eyes, so I used "psPattern" and
>set the Pen-Pattern as such:
>
>const
>  Pattern:array [0..7] of longint=(1, 1, 1, 1, 0, 0, 0, 0)
>
>This is wrong of course; however reading some google I thought that
>each
>array element in the TPenPattern array describes one pixel. The problem
>now was, that Qt produces quite reasonable results: a 4-pixel dashed
>line. Also GTK2 did the job - if the line was drawn _outside_ any
>Paint-Message.
>
>In that case (e.g. when actually setting this as a Pen-Pattern for a
>Chart series), the X-Function 58 (SetDashes) produced the Errorcode 2
>(Out of range) and the Program ended directly at the 1st Paint-Event -
>leaving Lazarus and GDB in the wild with no backtrace or alike.
>
>Of course it works now with the Pattern
>
>const
>  Pattern:array [0..1] of longint=(4, 4)
>
>But: I think that, if this is the correct way to do it, and the value
>"0" for any portion of the pattern is indeed not allowed (as stated in
>the X-Documentation e.g. here:
>https://www.x.org/releases/X11R7.7/doc/xproto/x11protocol.html#requests:SetDashes),
>shouldn't TPen.SetPattern raise an exception when an invalid pattern is
>given?

Don't think so. The gtk implementation should have checked this and probably 
skip the 0


>I don't know about other OSes / Widgestsets, if there are the same
>"rules".

Imo the QT implementation should be adapted to behave the same.
Wat does Delphi in this case?

>I could try to file a bugreport / try to provide a patch; but maybe
>it's
>enough to cite the X-Docs somewhere in the Lazarus-Documentation? What
>do you think?

We shouldn't "copy"the x behaviour, but behave the same as Delphi.

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


Re: [Lazarus] Package filenames with _package

2018-01-07 Thread Michael Van Canneyt via Lazarus



On Sun, 7 Jan 2018, Mattias Gaertner via Lazarus wrote:


On Sun, 7 Jan 2018 10:42:33 +0100 (CET)
Michael Van Canneyt via Lazarus  wrote:


[...]
The "problem" is that the pascal unit generated for a package has the
same name as the package and often conflicts with a unit in the package. 


The package unit can have a different name as the package. See
for example synedit.


I didn't know this, and this is good to know !

Should not the IDE do this automatically by default then ?

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


Re: [Lazarus] Package filenames with _package

2018-01-07 Thread Ondrej Pokorny via Lazarus

On 07.01.2018 20:29, Vojtěch Čihák via Lazarus wrote:


Hi,

click Package->New Package...

it immediately opens Save dialog, where you choose filname. It saves 
xyz.lpk


Then click Compile and xyz.pas is autogenerated.



:D

The question was: it saves xyz.lpk, where can I define that abc.pas is 
autogenerated/used for xyz.lpk instead of xyz.pas?


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


Re: [Lazarus] Package filenames with _package

2018-01-07 Thread Vojtěch Čihák via Lazarus

I noticed: if the main package file has the same name as the lpk than it is not 
listed in that lpk, right?
V.
__

Od: Mattias Gaertner via Lazarus 
Komu: lazarus@lists.lazarus-ide.org
Datum: 07.01.2018 14:55
Předmět: Re: [Lazarus] Package filenames with _package


On Sun, 7 Jan 2018 20:08:31 +0700
Ondrej Pokorny via Lazarus  wrote:

>[...]
> >> The package unit can have a different name as the package. See
> >> for example synedit.  
> >
> > I didn't know this, and this is good to know !  
> 
> I didn't know this either. Where can the pas file name be changed? I 
> can't find any entry in the Package Options dialog.


Right click on an unit in the package editor and set File Type to "Main
Unit". That is then the auto generated unit.

Here is how to create a new package with this:
http://wiki.freepascal.org/Lazarus_Packages#Create_a_package_with_a_unit_that_has_the_same_name_as_the_package
 


If you often need to create packages a custom main unit name, feel free
to create a new package type or an initial setup dialog.


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


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


Re: [Lazarus] Package filenames with _package

2018-01-07 Thread Michael Van Canneyt via Lazarus



On Sun, 7 Jan 2018, leledumbo via Lazarus wrote:


It is good filenames, with _package suffix, easy to see filenames from all

filenames in big dir

I don't agree, that's what file extension is for. Filtering and sorting
should easily be done to distinguish package files from others.


I am glad to read this, I also think the _package is completely redundant.

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


Re: [Lazarus] Package filenames with _package

2018-01-07 Thread AlexeyT via Lazarus



I don't agree, that's what file extension is for. Filtering and sorting
should easily be done to distinguish package files from others.


There is one moment: ATSynedit has

- atsynedit.pas (main unit)

- atsynedit_package.pas (with suffix)

You see suffix is useful here.

--
Regards,
Alexey

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


Re: [Lazarus] Package filenames with _package

2018-01-07 Thread Michael Van Canneyt via Lazarus



On Sun, 7 Jan 2018, AlexeyT via Lazarus wrote:



I am glad to read this, I also think the _package is completely 
redundant.


many Laz packages have suffix anyway: Dsgn, Pkg, pkg, maybe others.


True. And this is unfortunate, because it is not functional at all.

The "problem" is that the pascal unit generated for a package has the
same name as the package and often conflicts with a unit in the package. 
IMO it would be better to prefix it automatically.  (fpmake does this when

it makes a build unit)

MyPackage.lpk -> build_Mypackage.pas
or maybe
MyPackage.lpk -> run_Mypackage.pas
MyPackage.lpk -> ide_Mypackage.pas
Depending on what you chose for package options.

That way you would not need to prefix your package name with anything, 
unless you split your package in a design and runtime package. In the latter

case the prefix (or suffix) is still functional: it tells you that it is run
or design...

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


Re: [Lazarus] Package filenames with _package

2018-01-07 Thread Werner Pamler via Lazarus

Am 05.01.2018 um 18:12 schrieb AlexeyT via Lazarus:


 1. packager/globallinks/lclextensions_package-0.6.1.lpl



 2. +1 −0


packager/globallinks/virtualtreeview_package-5.5.3.1.lpl




(trunk)

It is good filenames, with _package suffix, easy to see filenames from 
all filenames in big dir. AT* packages also use this suffix. i suggest 
to add this suffix to ALL default packages




Again, we had this already in a similar context, but now it will break 
EVERY project out there.


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


Re: [Lazarus] Package filenames with _package

2018-01-07 Thread Graeme Geldenhuys via Lazarus

On 2018-01-07 09:42, Michael Van Canneyt via Lazarus wrote:

many Laz packages have suffix anyway: Dsgn, Pkg, pkg, maybe others.

True. And this is unfortunate, because it is not functional at all.


Well, I think it is very important to distinguish between "runtime" and 
"design time" packages. One has very different dependencies and meaning 
compared to the other one.


Your idea of fpmake using automatic prefixes is good and all, but when a 
developer creates a package using Lazarus IDE, there is no "automatic 
naming" in play.


The "pkg" suffix is pointless indeed, that is what the file extension is 
for. But the "dsgn" suffix is commonly used to distinguish between 
runtime (no suffix) and design time usage.


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] Package filenames with _package

2018-01-07 Thread AlexeyT via Lazarus


conflicts with a unit in the package. IMO it would be better to prefix 
it automatically.
I agree: better to auto add prefix or suffix (i like suffix _package). 
good wish.


--
Regards,
Alexey

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


[Lazarus] Strip symbols in IDE

2018-01-07 Thread Vojtěch Čihák via Lazarus
Hi,
 
does the checkbox [X] Strip symbols from executble works well for you?
It does nothing here. If I then do:
>strip project1
in xterm, it works. I have "strip" installed in /usr/bin.
It seems that other options have no efect to it, except -Xg [X] Use external 
debug file.
 
V.
-- 
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] GTK2/X Appcrash when TPen.Pattern has invalid value

2018-01-07 Thread Alexander Hofmann via Lazarus
Hi,

Am 07.01.2018 um 11:39 schrieb Marc Weustink via Lazarus:
> Imo the QT implementation should be adapted to behave the same.
> Wat does Delphi in this case?
Thank's for your reply.
I only have an old Delphi 7 version here - they all don't have the
Pattern option for TPen. When done manually, the ExtCreatePen function
of the Windows GDI also expects an array with the length(s) of
individual strokes in the pattern (see
https://msdn.microsoft.com/en-us/library/windows/desktop/dd162705(v=vs.85).aspx
), so I would expect newer Delphi versions to implement it that way
(same as on X).

Of course this is still MY failure, not any of the LCL...

Best regards,
Alex


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


Re: [Lazarus] lazarus-ccr (or other) TBufDataSet Documentation?

2018-01-07 Thread Donald Ziesig via Lazarus

On 01/07/2018 03:33 AM, leledumbo via Lazarus wrote:

So far I have had no success.  Do I have to use the source alone?

I think there's none officially, but google gives me these:
-
http://wiki.lazarus.freepascal.org/How_to_write_in-memory_database_applications_in_Lazarus/FPC
- http://www.pp4s.co.uk/main/tu-db-bufdataset.html



--
Sent from: http://free-pascal-lazarus.989080.n3.nabble.com/


Thanks, I found both of those.  Unfortunately, they don't describe the 
api (especially the protected methods).


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


Re: [Lazarus] lazarus-ccr (or other) TBufDataSet Documentation?

2018-01-07 Thread Donald Ziesig via Lazarus

On 01/07/2018 03:32 AM, Michael Van Canneyt via Lazarus wrote:



On Sat, 6 Jan 2018, Donald Ziesig via Lazarus wrote:


Hi All!

I have been trying to find documentation for the TBufDataSet (or 
TMemDataSet) as is available for most other components in the Lazarus 
Code and Component Repository Documentation.  So far I have had no 
success.  Do I have to use the source alone?


Yes, for the time being...

BufDataset is one of the next units on my list of units to document.

Michael.



Michael,

I'm looking forward to that.  Keep up the good work.

Don

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


Re: [Lazarus] Can the Lazarus IDE match parentheses and begin/ends?

2018-01-07 Thread Martin Frb via Lazarus

On 07/01/18 22:31, Bo Berglund via Lazarus wrote:

In another code line if I do the same and put the cursorat the end );
between the last chars, then the highlight comes on and boxes the last
) paired with a ( on 7 lines above when there are a lot of both ( and
) inbetween
Clearly an erroneous highlight.


Please check this kind of errors, with 1.8.2 (once released) or the bug 
fix patch applied.

If an incorrect bracket is highlighted with the fix, then please report it.

Note that, brackets in strings or comments, will/should not be matched 
with brackets in code.


   if (a = '(' ) then // (
        a := ')';  // )

should match
- the 2 brackets in code
- AND the 2 brackets inside the 2 strings
- AND the 2 brackets inside the 2 comments

It should also match the correct quotes '.

Bracket matching only ever looks at one kind of brackets.
When matching (), it will totally ignore any [].
So erroneous code like
  if (a[1]] = 2) then
will match the ().
As well as the [] directly around the 1.
And the extra ] will not match anything.

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


Re: [Lazarus] Can the Lazarus IDE match parentheses and begin/ends?

2018-01-07 Thread Bo Berglund via Lazarus
On Sat, 6 Jan 2018 12:33:43 +0100, Martin Frb via Lazarus
 wrote:

>On 06/01/18 10:25, Bo Berglund via Lazarus wrote:

>> Not working:
>> ( ): Controlled by what?
>Should be the same as ()
>
>Just remember, I think there is a bug in 1.8 (already fixed for the not 
>yet released 1.8.2)
>
>brackets only work if they are surrounded by spaces (or maybe it was NOT 
>surrounded...)
>https://bugs.freepascal.org/view.php?id=32803
>

OK, I see
There are strange highlighting going on, example:
Parms.Add(IntToStr(Rev));
Here if I put the cursor left of the ; I get hightlight properly.
But any place before or after any other ( or ) no highlight!

In another code line if I do the same and put the cursorat the end );
between the last chars, then the highlight comes on and boxes the last
) paired with a ( on 7 lines above when there are a lot of both ( and
) inbetween
Clearly an erroneous highlight.

Well, the other highlightings seem to work at least.

-- 
Bo Berglund
Developer in Sweden

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


Re: [Lazarus] Package filenames with _package

2018-01-07 Thread Mattias Gaertner via Lazarus
On Sun, 07 Jan 2018 15:02:18 +0100
Vojtěch Čihák via Lazarus  wrote:

> I noticed: if the main package file has the same name as the lpk than it is 
> not listed in that lpk, right?

Correct.
Not every package needs such a file.

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