Re: [Lazarus] Code Tools Feature request

2016-01-15 Thread Mattias Gaertner
On Fri, 15 Jan 2016 12:53:10 +0100
Ondrej Pokorny  wrote:

>[...]
> > Function TMyClass.SomeMethod(AnArgument: String) ;
> >
> > begin
> >
> > end;
> >
> > procedure TMyClass.DoSomethingElse(AnArgument : String; Options : 
> > TMyoptions);
> >[...]
> Strange,  your example works for me - I do  have the hyperlink, I do get 
> a hint when I hover over the type and I can Ctrl+Click it. So for me 
> CodeTools ignore this particular error.

It is ignored in mode Delphi, not in ObjFPC.

Mattias

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] New menu editor's in-place "Edit Caption" feature + QT

2016-01-15 Thread Zeljko



On 01/14/2016 10:53 PM, Juha Manninen wrote:

The new menu editor has a nice feature.
Pressing Enter on a menu item lets you edit its caption without moving
to Object Inspector.
It does not work when IDE is built with QT bindings.
It this a known issue?


AFAIK no.

zeljko

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


[Lazarus] Code Tools Feature request

2016-01-15 Thread Michael Van Canneyt


Hi,

When I want to get information on an identifier, sometimes the 'jump to 
declaration'
or the tooltip with declaration info do not appear, because the source code
contains errors.


Example source code:

-
Function TMyClass.SomeMethod(AnArgument: String) ;

begin

end;

procedure TMyClass.DoSomethingElse(AnArgument : String; Options : TMyoptions);

-

if I hover over TMyOptions, then I get nothing. If I want to ctrl-click it,
it doesn't appear as a hyperlink (as it would if all was OK).

The reason is of course that the function declaration right before it is wrong.
(it misses the return type). That's OK.

But what I would like to see is WHY I'm not getting any info... 
Presumably this is the error the code tools produce when looking for the info ?


Is it doable for the messages window to show this reason ?

Michael.

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] New menu designer

2016-01-15 Thread Péter Gábor


2016-01-15 00:27 keltezéssel, Maxim Ganetsky írta:
> String "composing" is still present e. g. in "Insert from template"
> dialog ("Choose template to ..." groupbox caption) and in main menu
> creation form in "add menu item" fields captions.
> 
> Also lismenueditororclickheadertosortbythatcolumn string looks
> suspicious from this POV.
> 
> As for lismenueditormoveseparatedeleteinsertitems: you shouldn't try to
> align text with buttons this way. It won't work with other than Windows'
> fonts/font sizes (e.g. on Linux) and other languages. Better change this
> string to regular caption like "Menu Item actions".
> 
> Also I noticed that e. g. "Insert from template" dialog is not
> resizable. It is better to have resizable dialogs in order to fit longer
> translation captions (e. g. combobox caption in this case).
> 
I started typing about this when your message landed here :)

Another problem I found is that sometimes if I click in the designer
area it scrolls the content and the bottom scrollbar is fully covered.
Scrolling down with the scrollbar on the side will slowly reveal the
bottom scrollbar. Linux/GTK2 screenshot attached...

-- 
Péter Gábor
p...@freemail.hu

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] New menu editor's in-place "Edit Caption" feature + QT

2016-01-15 Thread Péter Gábor


2016-01-14 22:53 keltezéssel, Juha Manninen írta:
> The new menu editor has a nice feature.
> Pressing Enter on a menu item lets you edit its caption without moving
> to Object Inspector.
> It does not work when IDE is built with QT bindings.
> It this a known issue?

On Linux/GTK2 when I edit the caption of the menu in place (inside the
designer) I can drag the window but the active text input field does not
move with it.
See attached screenshot...
Also the scrollbar issue I found is visible on it.


-- 
Péter Gábor
p...@freemail.hu

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Code Tools Feature request

2016-01-15 Thread Ondrej Pokorny

On 15.01.2016 10:59, Michael Van Canneyt wrote:

Example source code:

- 


Function TMyClass.SomeMethod(AnArgument: String) ;

begin

end;

procedure TMyClass.DoSomethingElse(AnArgument : String; Options : 
TMyoptions);


- 



if I hover over TMyOptions, then I get nothing. If I want to 
ctrl-click it,

it doesn't appear as a hyperlink (as it would if all was OK).


Strange,  your example works for me - I do  have the hyperlink, I do get 
a hint when I hover over the type and I can Ctrl+Click it. So for me 
CodeTools ignore this particular error.


Ondrej

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Cannot find unit lNet when building project

2016-01-15 Thread Bo Berglund
On Fri, 15 Jan 2016 12:30:32 +0100, Mattias Gaertner
 wrote:

>> >Maybe you updated your compiler and forgot to update lnet?
>> Same compiler as before (3.0.0)
>> And the IDE picks up the source unit from:
>> /usr/fpc/3.0.0/utils/fppkg/lnet/lnet.pp
>
>Good. That's the usual place on Linux.

OK, when I hover the mouse over the error message in Lazarus there is
additional info about it. It says that it is missing the corresponding
PPU file...
So I searched for it:
sudo find / -iname lnet.*
/usr/share/src/fpc-2.6.4/fpc/utils/fppkg/lnet/lnet.pp
/usr/fpc/3.0.0/utils/fppkg/lnet/lnet.pp

So there does not seem to exist an lnet.ppu file.
How is that created? When compiling fpc or as part of building an
application that uses it (would be what I'd assume)?

I installed fpc using the make functions in the source:
sudo make all
sudo make install sourceinstall
Maybe it does not really build the full system?
Is there a command to actually also create the ppu files?


-- 
Bo Berglund
Developer in Sweden


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] New menu designer. which style do you prefer?

2016-01-15 Thread Ondrej Pokorny

On 11.01.2016 21:36, Howard wrote:

On 11/01/2016 16:07, Anthony Walter wrote:

Very nice. I like the new design.

Side note: Who wrote that FScroller for the new menu editor? It acts 
very erratic for me on Gtk2. I don't know about on other widget sets. 
See issue 29369. Why not use TScrollBox or make TShadowMenu a 
TScrollingWinControl?


I wrote it. It is definitely the weakest part of the new designer. I 
hate to reinvent the wheel. However, I could not get a TScrollBox 
container to work correctly for TShadowMenu, perhaps because its size 
calculation and painting is rather non-standard. Whatever the reason I 
was unable to get a TScrollBox container to respond correctly to 
TShadowMenu size changes when there were more than a screenful of 
menuitems.
I'm honestly not sure if the best approach to sorting it out is to 
mend (or rewrite) FScroller, or to figure out a way for TScrollBox to 
parent TShadowMenu correctly. I did not try making TShadowMenu a 
TScrollingWinControl descendant. Perhaps that would be a better 
option. What would others advise?


What were your problems? In r51298 I removed all the Scroller code and 
simply used TScrollBox for TShadowMenu and it works without any problems 
- much better than your Scroller experiment. I tested win32 and Linux+Gtk2.


Ondrej

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] New menu designer. which style do you prefer?

2016-01-15 Thread Ondrej Pokorny

On 15.01.2016 11:32, Ondrej Pokorny wrote:
What were your problems? In r51298 I removed all the Scroller code and 
simply used TScrollBox for TShadowMenu and it works without any 
problems - much better than your Scroller experiment. I tested win32 
and Linux+Gtk2.


Forgot to say, please test :)

Ondrej

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Cannot find unit lNet when building project

2016-01-15 Thread Bo Berglund
On Fri, 15 Jan 2016 11:58:40 +0100, Mattias Gaertner
 wrote:

>On Fri, 15 Jan 2016 11:53:25 +0100
>Bo Berglund  wrote:
>> But when I try to build the project there is a message:
>> Fatal: Cannot find lNet used by
>
>Did you install lnet via fppkg?
No, I did not install it. This is one of the first tests following
download and build (bigide) of RC2. Seems like the IDE finds the files
without any need for installation
Do I have to install non-visuel components in Lazarus? I usually
create the objects in code anyway and my test program is a console
(non-gui) program.

>Maybe you updated your compiler and forgot to update lnet?
Same compiler as before (3.0.0)
And the IDE picks up the source unit from:
/usr/fpc/3.0.0/utils/fppkg/lnet/lnet.pp

>Also check that you have only one lnet.ppu.
I only have fpc 3.0.0 plus the seed 2.6.4 on this computer (Raspberry
Pi2). I don't know where the lnet.ppu file would be located...



-- 
Bo Berglund
Developer in Sweden


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Cannot find unit lNet when building project

2016-01-15 Thread Bo Berglund
On Fri, 15 Jan 2016 12:09:58 +0100, Bo Berglund
 wrote:
>>Did you install lnet via fppkg?
>No, I did not install it. This is one of the first tests following
>download and build (bigide) of RC2. Seems like the IDE finds the files
>without any need for installation

Furthermore:
I had a look in Lazarus RC2 and I could not even find the lNet package
listed among the ones that could be installed/uninstalled.
Nothing in the "Installed" list and nothing in "Available for
installation" either.

So I don't even know how one could install this package...

I am still wondering why it won't compile when the IDE clearly finds
the unit file?


-- 
Bo Berglund
Developer in Sweden


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Cannot find unit lNet when building project

2016-01-15 Thread Bo Berglund
On Fri, 15 Jan 2016 13:44:08 +0100, Bo Berglund
 wrote:

I copied the lnet source dir from fpc into my Projects dir below
/home/pi and set the compiler search path to include this location.
Now it works again.
Don't know why it needed this since the IDE actually found the files
at fpc 3.0.0.
Not good to have to copy distribution files into the local project
folder.

-- 
Bo Berglund
Developer in Sweden


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Code Tools Feature request

2016-01-15 Thread Graeme Geldenhuys
On 2016-01-15 09:59, Michael Van Canneyt wrote:
> if I hover over TMyOptions, then I get nothing. If I want to ctrl-click it,
> it doesn't appear as a hyperlink (as it would if all was OK).

I've also noticed this recently. Is this new behaviour in Lazarus? I'm
pretty sure it wasn't always like this. Is CodeTools more sensitive to
source code errors in recent Lazarus versions?

Regards,
  - Graeme -



My public PGP key:  http://tinyurl.com/graeme-pgp

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Cannot find unit lNet when building project

2016-01-15 Thread Mattias Gaertner
On Fri, 15 Jan 2016 11:53:25 +0100
Bo Berglund  wrote:

> I have a test project that I try to run using 1.6RC2.
> In the source editor I can right click the uses line where lNet is
> specified and select "Find declaration" and it opens the unit in a new
> tab.
> But when I try to build the project there is a message:
> Fatal: Cannot find lNet used by
> 
> What could be the problem? Obviously Lazarus knows how to find the
> unit and still the compile fails...

Did you install lnet via fppkg?
Maybe you updated your compiler and forgot to update lnet?
Also check that you have only one lnet.ppu.

Mattias

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] New menu designer. which style do you prefer?

2016-01-15 Thread Ondrej Pokorny

On 15.01.2016 11:32, Ondrej Pokorny wrote:
I did not try making TShadowMenu a TScrollingWinControl descendant. 
Perhaps that would be a better option. What would others advise?


What were your problems? In r51298 I removed all the Scroller code and 
simply used TScrollBox for TShadowMenu and it works without any 
problems - much better than your Scroller experiment. I tested win32 
and Linux+Gtk2.


Sorry, my apologies - I missed that you didn't try it.

Ondrej

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Code Tools Feature request

2016-01-15 Thread Mattias Gaertner
On Fri, 15 Jan 2016 10:53:49 +
Graeme Geldenhuys  wrote:

> On 2016-01-15 09:59, Michael Van Canneyt wrote:
> > if I hover over TMyOptions, then I get nothing. If I want to ctrl-click it,
> > it doesn't appear as a hyperlink (as it would if all was OK).
> 
> I've also noticed this recently. Is this new behaviour in Lazarus? I'm
> pretty sure it wasn't always like this. 

A missing function type raises an error since many years.

> Is CodeTools more sensitive to source code errors in recent Lazarus versions?

In order to parse some new syntax features some errors are no longer
ignored. So yes, you could say it got more sensitive to errors.

Mattias

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] New menu designer

2016-01-15 Thread Péter Gábor


2016-01-15 08:50 keltezéssel, Péter Gábor írta:
> 
> 
> 2016-01-15 00:27 keltezéssel, Maxim Ganetsky írta:
>> String "composing" is still present e. g. in "Insert from template"
>> dialog ("Choose template to ..." groupbox caption) and in main menu
>> creation form in "add menu item" fields captions.
>>
>> Also lismenueditororclickheadertosortbythatcolumn string looks
>> suspicious from this POV.
>>
>> As for lismenueditormoveseparatedeleteinsertitems: you shouldn't try to
>> align text with buttons this way. It won't work with other than Windows'
>> fonts/font sizes (e.g. on Linux) and other languages. Better change this
>> string to regular caption like "Menu Item actions".
>>
>> Also I noticed that e. g. "Insert from template" dialog is not
>> resizable. It is better to have resizable dialogs in order to fit longer
>> translation captions (e. g. combobox caption in this case).
>>
> I started typing about this when your message landed here :)
> 
> Another problem I found is that sometimes if I click in the designer
> area it scrolls the content and the bottom scrollbar is fully covered.
> Scrolling down with the scrollbar on the side will slowly reveal the
> bottom scrollbar. Linux/GTK2 screenshot attached...
> 
Also when I drag the bottom scrollbar the content will cover/reveal the
scrollbar on the side of the designer...

-- 
Péter Gábor
p...@freemail.hu


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


[Lazarus] Cannot find unit lNet when building project

2016-01-15 Thread Bo Berglund
I have a test project that I try to run using 1.6RC2.
In the source editor I can right click the uses line where lNet is
specified and select "Find declaration" and it opens the unit in a new
tab.
But when I try to build the project there is a message:
Fatal: Cannot find lNet used by

What could be the problem? Obviously Lazarus knows how to find the
unit and still the compile fails...


-- 
Bo Berglund
Developer in Sweden


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Cannot find unit lNet when building project

2016-01-15 Thread Mattias Gaertner
On Fri, 15 Jan 2016 12:09:58 +0100
Bo Berglund  wrote:

> On Fri, 15 Jan 2016 11:58:40 +0100, Mattias Gaertner
>  wrote:
> 
> >On Fri, 15 Jan 2016 11:53:25 +0100
> >Bo Berglund  wrote:
> >> But when I try to build the project there is a message:
> >> Fatal: Cannot find lNet used by
> >
> >Did you install lnet via fppkg?
> No, I did not install it. This is one of the first tests following
> download and build (bigide) of RC2. Seems like the IDE finds the files
> without any need for installation

"lnet" is a normal unit of FPC.
Compile with -vut to see where the compiler searches and what it finds.


> Do I have to install non-visuel components in Lazarus?

Packages only need to be "Install"ed if they provide IDE addons.


> I usually
> create the objects in code anyway and my test program is a console
> (non-gui) program.
> 
> >Maybe you updated your compiler and forgot to update lnet?
> Same compiler as before (3.0.0)
> And the IDE picks up the source unit from:
> /usr/fpc/3.0.0/utils/fppkg/lnet/lnet.pp

Good. That's the usual place on Linux.

 
Mattias

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Cannot find unit lNet when building project

2016-01-15 Thread Mattias Gaertner
On Fri, 15 Jan 2016 12:28:37 +0100
Bo Berglund  wrote:

>[...]
> So I don't even know how one could install this package...

fppkg is another package system.

About fppkg:
http://wiki.freepascal.org/fppkg


Mattias

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] New menu editor's in-place "Edit Caption" feature + QT

2016-01-15 Thread Ondrej Pokorny

On 14.01.2016 22:53, Juha Manninen wrote:

The new menu editor has a nice feature.
Pressing Enter on a menu item lets you edit its caption without moving
to Object Inspector.


Howard, why do you open a modal window for it? That doesn't make sense. 
Take a look how a grid shows the in-place editor. You should use a 
similar approach.


Ondrej

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Code Tools Feature request

2016-01-15 Thread Graeme Geldenhuys
On 2016-01-15 11:16, Mattias Gaertner wrote:
> In order to parse some new syntax features some errors are no longer
> ignored. So yes, you could say it got more sensitive to errors.

OK thanks. That's probably what I noticed then.


Regards,
  - Graeme -


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Code Tools Feature request

2016-01-15 Thread Michael Van Canneyt



On Fri, 15 Jan 2016, Mattias Gaertner wrote:


On Fri, 15 Jan 2016 12:53:10 +0100
Ondrej Pokorny  wrote:


[...]

Function TMyClass.SomeMethod(AnArgument: String) ;

begin

end;

procedure TMyClass.DoSomethingElse(AnArgument : String; Options :
TMyoptions);
[...]

Strange,  your example works for me - I do  have the hyperlink, I do get
a hint when I hover over the type and I can Ctrl+Click it. So for me
CodeTools ignore this particular error.


It is ignored in mode Delphi, not in ObjFPC.


But would it be possible to show the error ? Try as I might, there is no
error in the messages window. For other cases there is, but not for this.

Well. The least I can say is that it is not clear to me when the IDE shows 
a codetools related error in messages and when not :-)


Michael.

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Cannot find unit lNet when building project

2016-01-15 Thread Sven Barth
Am 15.01.2016 12:30 schrieb "Mattias Gaertner" :
> > I usually
> > create the objects in code anyway and my test program is a console
> > (non-gui) program.
> >
> > >Maybe you updated your compiler and forgot to update lnet?
> > Same compiler as before (3.0.0)
> > And the IDE picks up the source unit from:
> > /usr/fpc/3.0.0/utils/fppkg/lnet/lnet.pp
>
> Good. That's the usual place on Linux.

That's the place where fppkg needs it during compilation, yes, but not
where the compiler would and should find it. The user should use fppkg
(just a coincidence that both times fppkg is involved here) to install the
package (AFAIK "fppkg install lnet").

Regards,
Sven
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Cannot find unit lNet when building project

2016-01-15 Thread Bo Berglund
On Fri, 15 Jan 2016 14:38:52 +0100, Sven Barth
 wrote:

>> > And the IDE picks up the source unit from:
>> > /usr/fpc/3.0.0/utils/fppkg/lnet/lnet.pp
>>
>> Good. That's the usual place on Linux.
>
>That's the place where fppkg needs it during compilation, yes, but not
>where the compiler would and should find it. The user should use fppkg
>(just a coincidence that both times fppkg is involved here) to install the
>package (AFAIK "fppkg install lnet").
>
Is that a command in terminal inside the fpc source dir:
/usr/fpc/3.0.0/
or somewhere else Like:
/usr/fpc/3.0.0/utils/fppkg/lnet/

Or is it inside Lazarus somewhere?

A search for fppkg gives this:

pi@rpi2-jessie2:~/Projects/fpc $ sudo find / -iname fppkg
/usr/lib/fpc/3.0.0/units/arm-linux/fppkg
/usr/lib/fpc/2.6.4/units/arm-linux/fppkg
/usr/share/src/fpc-2.6.4/fpc/packages/fppkg
/usr/share/src/fpc-2.6.4/fpc/utils/fppkg
/usr/fpc/3.0.0/packages/fppkg
/usr/fpc/3.0.0/utils/fppkg
/usr/bin/fppkg
/etc/fppkg
/home/pi/dev/lazarus/1.6RC2/components/fppkg
/home/pi/dev/lazarus/1.6RC1/components/fppkg

And this is on path:
pi@rpi2-jessie2:~/Projects/fpc $ which fppkg
/usr/bin/fppkg


-- 
Bo Berglund
Developer in Sweden


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Cannot find unit lNet when building project

2016-01-15 Thread Mattias Gaertner
On Fri, 15 Jan 2016 14:50:35 +0100
Bo Berglund  wrote:

>[...](AFAIK "fppkg install lnet").

Yes.
It is a bit confusing, that lnet is in FPC sources, but needs to be
installed by fppkg.


> Is that a command in terminal inside the fpc source dir:
> /usr/fpc/3.0.0/
> or somewhere else Like:
> /usr/fpc/3.0.0/utils/fppkg/lnet/
> 
> Or is it inside Lazarus somewhere?

Please read the wiki page about fppkg I gave.


Mattias

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Cannot find unit lNet when building project

2016-01-15 Thread Mark Morgan Lloyd

Mattias Gaertner wrote:

On Fri, 15 Jan 2016 14:50:35 +0100
Bo Berglund  wrote:


[...](AFAIK "fppkg install lnet").


Yes.
It is a bit confusing, that lnet is in FPC sources, but needs to be
installed by fppkg.


I agree. Does anybody know the historical reason for this?

--
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk

[Opinions above are the author's, not those of his employers or colleagues]

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Cannot find unit lNet when building project

2016-01-15 Thread Bo Berglund
On Fri, 15 Jan 2016 15:53:13 +0100, Mattias Gaertner
 wrote:

>Please read the wiki page about fppkg I gave.

Sorry, thought of that only after hitting the send button.. :(


-- 
Bo Berglund
Developer in Sweden


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


[Lazarus] FileExistsUTF8 and long paths

2016-01-15 Thread Jürgen Hestermann

With Lazarus RC2 (and I think before too) "FileExistsUTF8" uses
"_FileGetAttrUtf8" which again uses FileGetAttrWide (on Windows if Unicode is 
enable)
which again uses "Windows.GetFileAttributesW(PWideChar(UTF8Decode(FileName)))"

but this fails for long paths (if Length(FileName)>255).
Why not prepend "\\?\" at this last Windows step so it works for long paths too?


BTW:
I am not sure whether this leads to errors but while the result of the Windows 
API-function
GetFileAttributesW is declared to be DWORD
this result is converted (or is ist just typecasted?) to Integer in

function FileGetAttrWide(const FileName: String): Longint;
begin
Result:=Integer(Windows.GetFileAttributesW(PWideChar(UTF8Decode(FileName;
end;

Doesn't this provoke at least a range check errors?
What happens when I compare the integer result with (DWORD) constants which 
havbe the first bit set?

This seems to be done at many places with many DWORD results from Windows API 
functions.
Is this a bug?

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Cannot find unit lNet when building project

2016-01-15 Thread Sven Barth
Am 15.01.2016 16:08 schrieb "Mark Morgan Lloyd" <
markmll.laza...@telemetry.co.uk>:
>
> Mattias Gaertner wrote:
>>
>> On Fri, 15 Jan 2016 14:50:35 +0100
>> Bo Berglund  wrote:
>>
>>> [...](AFAIK "fppkg install lnet").
>>
>>
>> Yes.
>> It is a bit confusing, that lnet is in FPC sources, but needs to be
>> installed by fppkg.
>
>
> I agree. Does anybody know the historical reason for this?

fppkg needs socket support, but that was needed before our own
implementation was ready enough, so lnet was imported directly into fppkg
as to avoid the appearance that lnet is distributed in the fpc sources.

Regards,
Sven
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


[Lazarus] Web vs desktop development

2016-01-15 Thread Anthony Walter
On a programming web forum someone said regarding Lazarus:

On just cursory review, looks compelling. However, I get so little call
these days for native/desktop applications. Seems everyone wants web now.

I replied:

I agree that web applications are far superior in many situations. Compared
to desktop applications they are much easier to deploy, much easier to
upgrade, they work across multiple platforms, the user experience is much
richer (easier to layout, video, audio integration, css transitions), data
handling is easier (no need for local database server or local database
connection configurations), and of course web applications go much better
with the software as a service subscription or pricing model.

That said, desktop applications have a better time working with local
resources like files, scanners, printers (though cloud services for storage
and printing make this less relevant), are usually more responsive, they
obviously have better desktop integration (copy and paste, drag and drop),
usually have better user interface layout management (docking windows,
toolbars, menus), better performance, better direct access to memory data
structures (think of images editing accessing pixels, editing audio
waveform samples), and are better for applications which require long time
processing like encoding videos or recording audio.

That said, I prefer desktop software for doings tasks, which I think is
what most computer enthusiasts want to do. I write desktop software to
automatically scan Craigslist and eBay for collectibles which interest me.
I write desktop software to monitor video feeds with OpenCV. I write
desktop software to make games with SDL2/GLESV2. On so on ...

I guess what it comes down to is this:

For businesses web development is probably a better fit for their software
needs.

For people who are computer enthusiasts that use their computers to process
tasks or solve problems, desktop development is probably better.

What are your opinions on the subject title ?
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Web vs desktop development

2016-01-15 Thread Dmitry Boyarintsev
On Fri, Jan 15, 2016 at 12:29 PM, Anthony Walter  wrote:

> For businesses web development is probably a better fit for their software
> needs.
>
> For people who are computer enthusiasts that use their computers to
> process tasks or solve problems, desktop development is probably better.
>
> What are your opinions on the subject title ?
>

I think you're missing security considerations as well.

When a desktop application is compromised, it's likely that only a
particular user would a victim.
For web-applications, all users might be compromised as well.

The trend is actually switching to web+desktop applications. I.e. Steam
client or Delphi's "help" window.
So each application is a browser on its own.
A smarter framework might suggest an alternative to html+js, so it could
integrate with any application easily, rather than for a browser
application.

thanks,
Dmitry
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Cannot find unit lNet when building project

2016-01-15 Thread Bo Berglund
On Fri, 15 Jan 2016 15:53:13 +0100, Mattias Gaertner
 wrote:

>Please read the wiki page about fppkg I gave.

Did so but I was confused about the statements there regarding the
extra line to add to /etc/fpc.conf
Not clear enough in my view regarding the *exact* looks of the line.

But I looked through my fpc.conf file and found this, which looks
similar to the wiki page:

# searchpath for fppkg user-specific packages
-Fu~/.fppkg/lib/fpc/$fpcversion/units/$FPCTARGET/*

Note that it says $FPCTARGET at the end rather than $fpctarget (case
not sensitive here?)

In any case I did not edit the conf file but instead launched
fppkg install lnet

and after a minute or so I got this:

Lazarus directory '/home/pi/.fppkg/build/lnet/' does not contain a
valid Lazarus installation. Lazarus-package registration skipped.
Installation package lnet for target arm-linux succeeded

What does it mean that registration skipped?

In any case my test program does build now using both Lazarus RC1 and
RC2.

Thanks for your help!

Trying to create a clean environment for my embedded RPi2 development,
my last installation is wrecked by too many experiments with fpc and
lazarus versions from svn and other things...
This one only contains the seed fpc 2.6.4, release fpc 3.0.0 and
lazarus RC1 and now RC2.

Real soon I will be able to get back to working on the real project.
:)


-- 
Bo Berglund
Developer in Sweden


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Code Tools Feature request

2016-01-15 Thread Ondrej Pokorny

On 15.01.2016 13:11, Mattias Gaertner wrote:

It is ignored in mode Delphi, not in ObjFPC.


Correct!



But would it be possible to show the error ? Try as I might, there is no
error in the messages window. For other cases there is, but not for this.

Well. The least I can say is that it is not clear to me when the IDE 
shows a codetools related error in messages and when not :-)


Yes, the error is shown when explicitely executing CodeTools functions, 
e.g. identifier completion (Ctrl+Space), or "Find declaration of ..." 
from the popup menu but not when just hovering with the mouse. Maybe 
this is intended in order not to having false errors reported all the 
time when writing the code?


Ondrej

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Web vs desktop development

2016-01-15 Thread Curt Carpenter

Sounds right to me.  Good assessment.

On 1/15/2016 11:29 AM, Anthony Walter wrote:

On a programming web forum someone said regarding Lazarus:

On just cursory review, looks compelling. However, I get so little 
call these days for native/desktop applications. Seems everyone wants 
web now.


I replied:

I agree that web applications are far superior in many situations. 
Compared to desktop applications they are much easier to deploy, much 
easier to upgrade, they work across multiple platforms, the user 
experience is much richer (easier to layout, video, audio integration, 
css transitions), data handling is easier (no need for local database 
server or local database connection configurations), and of course web 
applications go much better with the software as a service 
subscription or pricing model.


That said, desktop applications have a better time working with local 
resources like files, scanners, printers (though cloud services for 
storage and printing make this less relevant), are usually more 
responsive, they obviously have better desktop integration (copy and 
paste, drag and drop), usually have better user interface layout 
management (docking windows, toolbars, menus), better performance, 
better direct access to memory data structures (think of images 
editing accessing pixels, editing audio waveform samples), and are 
better for applications which require long time processing like 
encoding videos or recording audio.


That said, I prefer desktop software for doings tasks, which I think 
is what most computer enthusiasts want to do. I write desktop software 
to automatically scan Craigslist and eBay for collectibles which 
interest me. I write desktop software to monitor video feeds with 
OpenCV. I write desktop software to make games with SDL2/GLESV2. On so 
on ...


I guess what it comes down to is this:

For businesses web development is probably a better fit for their 
software needs.


For people who are computer enthusiasts that use their computers to 
process tasks or solve problems, desktop development is probably better.


What are your opinions on the subject title ?


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Web vs desktop development

2016-01-15 Thread Anthony Walter
+1 On security considerations.

I forget to mention that. Installing software on Windows has gotten so bad
with so many download sites or software producers bundling adware, or even
spyway and malware. Microsoft themselves seem to have thrown in the towel
with Windows 10, packing in key logging, location tracking, and even
putting adware in they system notifications.

All of these security problem have a negative effect on the good desktop
software developers (us for example). Most people are now trained, either
from the advice of others or their own experience, to reject installing
"stuff" from the Internet.
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Web vs desktop development

2016-01-15 Thread JuuS

> 
> I guess what it comes down to is this:
> 
> For businesses web development is probably a better fit for their
> software needs.
> 
> For people who are computer enthusiasts that use their computers to
> process tasks or solve problems, desktop development is probably better.
> 
> What are your opinions on the subject title ?

I've always been of the opinion that the web is great for displaying
information. To use it as the central processor bugs me.

When I ask my program to do something I want the attention of the
processor. I don't want it going over the web (security issues) and then
asking for some perhaps overworked server processor time.

Then there is the issue of throughput. When I have a client executable
all I need is the data, so much less iNet traffic.

I've always been for web+desktop app. Rest of the world disagreed. Nice
to see maybe it's coming back...to sanity!

FWIW.

Julius

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Web vs desktop development

2016-01-15 Thread Aradeonas
> The trend is actually switching to web+desktop applications. I.e.
> Steam client or Delphi's "help" window. So each application is a
> browser on its own. A smarter framework might suggest an alternative
> to html+js, so it could integrate with any application easily, rather
> than for a browser application.
These app will be better these days because we can use them in as a
website and an application with a same source and minor changes but one
thing that amused me is that why until now I didnt see anything good
from FPC and Lazarus people here? I know its a Open Source world and
 but I saw many great thing but not this,is there a problem or
disagree about making these apps in FPC? As you can see they will be
more apps like these and their problem is speed sometimes that it can be
solved with FPC easily.

Regards, Ara


-- 
http://www.fastmail.com - A fast, anti-spam email service.

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Web vs desktop development

2016-01-15 Thread Dmitry Boyarintsev
On Fri, Jan 15, 2016 at 2:52 PM, Aradeonas  wrote:
>
> I know its a Open Source world and  but I saw many great thing but not
> this,is there a problem or disagree about making these apps in FPC?
> As you can see they will be more apps like these and their problem is
> speed sometimes that it can be solved with FPC easily.
>
See many threads (on the forum) about  integrating ChromeKit or Gecko into
LCL app

thanks,
Dmitry
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] New menu designer

2016-01-15 Thread Howard

On 14/01/2016 23:27, Maxim Ganetsky wrote:
String "composing" is still present e. g. in "Insert from template" 
dialog ("Choose template to ..." groupbox caption) and in main menu 
creation form in "add menu item" fields captions.


Also lismenueditororclickheadertosortbythatcolumn string looks 
suspicious from this POV.


As for lismenueditormoveseparatedeleteinsertitems: you shouldn't try 
to align text with buttons this way. It won't work with other than 
Windows' fonts/font sizes (e.g. on Linux) and other languages. Better 
change this string to regular caption like "Menu Item actions".


Also I noticed that e. g. "Insert from template" dialog is not 
resizable. It is better to have resizable dialogs in order to fit 
longer translation captions (e. g. combobox caption in this case).


I have submitted a patch (29411) which I hope addresses these issues, 
except for the issue:
'String "composing" is still present ... in main menu creation form in 
"add menu item" fields captions'


I am not clear about which string(s) you are identifying here. Can you 
give a specific line number in the source that exemplifies the problem 
you see?


Howard



--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] New menu designer. which style do you prefer?

2016-01-15 Thread Howard



On 15/01/2016 11:04, Ondrej Pokorny wrote:

On 15.01.2016 11:32, Ondrej Pokorny wrote:
I did not try making TShadowMenu a TScrollingWinControl descendant. 
Perhaps that would be a better option. What would others advise?


What were your problems? In r51298 I removed all the Scroller code 
and simply used TScrollBox for TShadowMenu and it works without any 
problems - much better than your Scroller experiment. I tested win32 
and Linux+Gtk2.


Sorry, my apologies - I missed that you didn't try it.


Yes working fine for me (Windows 7 32bit and Linux 64 bit).
I'm relieved that such a simple change has had such a good effect, and 
that no further tinkering with TShadowMenu size and positioning code was 
required; and that my poorly implemented scrolling code can therefore be 
dumped entirely.


Howard

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Web vs desktop development

2016-01-15 Thread Dmitry Boyarintsev
On Fri, Jan 15, 2016 at 11:55 PM, Aradeonas  wrote:
>
> Of course I saw them but as I said I surprised from that I cant find any
> particular good one because I have habit that always there will be good
> thing made with FPC and Lazarus.
>
> But if you know a especial one please give me a link.
>

Sorry, I'm not following any on them.

But, the biggest issue here is that most of the engines are C++ based.
FPC support of C++ classes is in initial state (and is on long term todo
list).
Thus building a bridge (i.e. C wrappers) for web library is required in
most cases.
So it's an extra step that a rare pascal developer would like to make and
maintain. And the quality of integration depends on the quality and
flexibility of created wrappers.

Take Qt as example -  C-wrappers are maintained by a single person and a
lot of Qt APIs is still missing.

thanks,
Dmitry
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Web vs desktop development

2016-01-15 Thread Giuliano Colla

Il 15/01/2016 18:29, Anthony Walter ha scritto:

On a programming web forum someone said regarding Lazarus:

On just cursory review, looks compelling. However, I get so little 
call these days for native/desktop applications. Seems everyone wants 
web now.




I agree with your points, but I'd like to add something more.

I believe that the first task of a designer is to pick up the most 
*appropriate* technology to solve the given problem, without being 
influenced by what is fashionable, "modern" or "cool".


My favourite example are the newspapers and the tomb stones.

From the beginning of civilization, important news were graved in stone 
slabs.
When paper and printing were invented, the new technology appeared much 
more appropriate, and the stone slabs were replaced by newspapers. With 
the advent of the Internet, a new technology has become available to 
spread news and information, which is faster and cheaper, provides a lot 
of extra features, and it is replacing the printed paper technology in 
many domains. The most appropriate technology prevails.


When it comes to a tombstone, it's stone age technology, but up to now 
nothing better has been found to put over a grave than a graved stone, 
so the stone age technology remains the most appropriate choice.


The same technology has been obsoleted twice for one application, but 
remains the most appropriate for another.


If an application is meant to run locally, with local data and local 
resources, making it a web application will inherit all the 
disadvantages of web, without any advantage. It would not be the 
appropriate choice.


If an application is run by a number of users scattered in different 
places and takes advantage of common information which can be held in a 
common server, then a web application is the best choice.


Intermediate cases must be carefully analysed, evaluating pros and cons, 
to pick up the most appropriate solution. A straight assumption "web is 
better" or "desktop is better" leads to poor results, if not to failures.


I'm running a consultant company, and frequently we have discussion with 
our customers trying to tell us not only what they want, but also how we 
should do it.
We always tell them that we may guarantee a good result only if we're 
free to pick up the most appropriate solution, disregarding the fashion 
of the day.
That way, in over thirty-five years of activity, we never failed a 
single project. I consider among our successes the few instances when we 
have been unable to convince our customers to accept our way, and 
therefore we decided to turn them down. They addressed elsewhere, and 
failed!


My 2 cents,

Giuliano


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] FileExistsUTF8 and long paths

2016-01-15 Thread Bart
On 1/15/16, Jürgen Hestermann  wrote:

> Why not prepend "\\?\" at this last Windows step so it works for long paths

This will break existing programs, including the ide.

Currently you can use both / and \ in filenames on Wndows filename
functions, because the API does not care.
That is unlues you prepend \\?\, then character in the given string
MUST be in the filename.
Also this will then return false on '..\foo.bar', sincenow te APi
expects that the two dots are part of the filename.

See the comments in ExpandFilenameUTF8 (I think I put a reference there).

Bart

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Web vs desktop development

2016-01-15 Thread Aradeonas
> See many threads (on the forum) about  integrating ChromeKit or Gecko
> into LCL app

Of course I saw them but as I said I surprised from that I cant find any
particular good one because I have habit that always there will be good
thing made with FPC and Lazarus.

But if you know a especial one please give me a link.

Regards, Ara


-- 
http://www.fastmail.com - Or how I learned to stop worrying and
  love email again

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus