Re: [Lazarus] Please stop the IDE regressions!

2016-02-24 Thread Graeme Geldenhuys
On 2016-02-25 03:19, Ondrej Pokorny wrote:
> if every 
> window has its own configurable toolbar with its tool buttons. So the 
> watches commands will be available in the watches dialog only.

I'm not sure I follow you 100%.  Maybe what Lazarus IDE needs is the
"detachable menus" - a feature supported by GTK for decades, but seldom
used. If you don't know, "detachable menus" are popup menus say from the
main menu, but the fist entry is a dashed line. If you click the dashed
line entry, that popup menu detaches and becomes a independent window
which you can place anywhere on the screen, and it says open. Clicking
the menu items in that detached windows DOESN'T close the window (unlike
what happens in popup menus). So this gives you a kind of "command
toolbar" all over the place.

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.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] SQLDb and TSQLQuery usage for MSSQL database...

2016-02-24 Thread Michael Van Canneyt



On Thu, 25 Feb 2016, Bo Berglund wrote:


On Wed, 24 Feb 2016 11:47:18 +0100 (CET), Michael Van Canneyt
 wrote:


constructor TUserDb.Create;
begin
 FConn := TMSSQLConnection.Create(NIL);
 FTrans := TSQLTransaction.Create(NIL);


You must additionally set

  FConn.Transaction:=FTrans;


 FQuery := TSQLQuery.Create(NIL);
 FQuery.DataBase := FConn; // <== Database property set here!!!
 FQuery.Transaction := FTrans;
end;


Now reading a bit more on the transaction subject and I get confused
by the wiki examples:
http://wiki.freepascal.org/SqlDBHowto#How_to_execute_direct_queries.2Fmake_a_table.3F
and
http://wiki.freepascal.org/SqlDBHowto#Example:_reading_data_from_a_table

It seems like in some examples one uses the transaction as follows:
ATransaction.StartTransaction;
.. do database stuff ...
ATransaction.Commit;

while in other cases there is no action taken on the ATransaction
object, it just sits there on both the query and connection objects
and it still works in my case.

I would like to understand what is happening here...


In general it is better to explicitly handle your transactions.
However, if you don't do that, then SQLDB will do it for you.



Note that in our stored procedures in MSSQLServer there are
transactions built-in where they are needed to safeguard consistency
across data in different tables for insance.


This is a given. You cannot disable transactions on a RDBMS server. 
(MySQL is not a RDBMS server in this sense)


They always are part of the game, but some engines 'hide' them by doing
transaction management implicitly.


The SQLDb transactions are still a bit unclear to me.
As yet I have only run stored procedures that return datasets
(basically select procedures) and these work OK but I don't know if
the transaction object really is involved here...

It seems like a TSQLTransaction activity is only needed if data are to
be changed in the database and not if they are only read from the
database. Is this correct?


Even reading is done in the context of a transaction.
But, quite often, it happens in an 'implicit' transaction.

Michael.

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


Re: [Lazarus] Please stop the IDE regressions!

2016-02-24 Thread Graeme Geldenhuys
On 2016-02-25 04:08, Ondrej Pokorny wrote:
> 
> I added them and other debug commands in r51693.


Thank you. I'll get an update today and retest.

As for IDE commands vs Other commands. I don't know how they are
organised... the hierarchy seems different to the IDE main menu. The eg:
Debug Windows menu items are in the IDE main menu hierachy, but not in
the IDE Command hierarchy. Weird.

I use shortcuts extensively, and I also remap shortcuts extensively to
suite my needs The standard ones often don't work well for the
Dvorak keyboard layout. So for the odd ball cases where I can't think of
a logical keyboard shortcut, I assigning those actions to the editor
toolbar, where I can find them very fast.

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.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] SQLDb and TSQLQuery usage for MSSQL database...

2016-02-24 Thread Bo Berglund
On Wed, 24 Feb 2016 11:47:18 +0100 (CET), Michael Van Canneyt
 wrote:

>> constructor TUserDb.Create;
>> begin
>>  FConn := TMSSQLConnection.Create(NIL);
>>  FTrans := TSQLTransaction.Create(NIL);
>
>You must additionally set
>
>   FConn.Transaction:=FTrans;
>
>>  FQuery := TSQLQuery.Create(NIL);
>>  FQuery.DataBase := FConn; // <== Database property set here!!!
>>  FQuery.Transaction := FTrans;
>> end;

Now reading a bit more on the transaction subject and I get confused
by the wiki examples:
http://wiki.freepascal.org/SqlDBHowto#How_to_execute_direct_queries.2Fmake_a_table.3F
and
http://wiki.freepascal.org/SqlDBHowto#Example:_reading_data_from_a_table

It seems like in some examples one uses the transaction as follows:
ATransaction.StartTransaction;
.. do database stuff ...
ATransaction.Commit;

while in other cases there is no action taken on the ATransaction
object, it just sits there on both the query and connection objects
and it still works in my case.

I would like to understand what is happening here...

Note that in our stored procedures in MSSQLServer there are
transactions built-in where they are needed to safeguard consistency
across data in different tables for insance.

The SQLDb transactions are still a bit unclear to me.
As yet I have only run stored procedures that return datasets
(basically select procedures) and these work OK but I don't know if
the transaction object really is involved here...

It seems like a TSQLTransaction activity is only needed if data are to
be changed in the database and not if they are only read from the
database. Is this correct?


-- 
Bo Berglund
Developer in Sweden


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


Re: [Lazarus] Please stop the IDE regressions!

2016-02-24 Thread Ondrej Pokorny

On 25.02.2016 4:19, Ondrej Pokorny wrote:

The new configurable Coolbar (toolbars) are useless in the same sense.
None of the "View -> Debugger Windows" menu items can be added to any
toolbars in the IDE.


Well, these can easily be added.


I added them and other debug commands in r51693.

Ondrej

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


Re: [Lazarus] Please stop the IDE regressions!

2016-02-24 Thread Ondrej Pokorny

On 25.02.2016 4:19, Ondrej Pokorny wrote:
I remember telling on the issue tracker after I made this change to 
check whether all needed commands are listed. I got no answer :) 


It's here: http://mantis.freepascal.org/view.php?id=27722#c86464

Ondrej

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


Re: [Lazarus] Lazarus 1.6 Object Inspector width, how to reduce?

2016-02-24 Thread Ondrej Pokorny

On 24.02.2016 19:23, Bo Berglund wrote:

On Wed, 24 Feb 2016 19:19:00 +0100, Bo Berglund
 wrote:

A quick test:
In 1.6RC2 the minimum width is about 233 pixels whereas in 1.6 it is
more like 430 pixels. That is a rather big part of my total width...

It turns out tha the code editor has also been provided with a rather
big minimum width! It is such thta I cannot set the code editor and
Object Inspector to fit the screen side by side. THere is a big
overlap tha cannot be reduced.
How did this happen?


No idea, I can reduce the width of OI to almost zero on Windows.

Ondrej

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


Re: [Lazarus] Please stop the IDE regressions!

2016-02-24 Thread Ondrej Pokorny

On 25.02.2016 2:27, Graeme Geldenhuys wrote:

Hi,

The Editor Toolbar is loosing functionality again (just like Procedure
List did)! I had toolbar shortcuts for debug windows (eg: watches, call
stack etc). Now with Lazarus v1.6 and later you can't add those to the
Editor Toolbar. Why???


There were a lot of buttons/commands registered that did nothing. I 
rewrote the toolbar/coolbar code and kept only IDE and editor commands 
in the EditorToolbar. Because commands from other windows are dependent 
on them and should be listed in configurable toolbars in their windows. 
See http://mantis.freepascal.org/view.php?id=27722


It's OK if you disagree with me. In this case please tell exactly what 
commands you are missing. I still think that it will be better if every 
window has its own configurable toolbar with its tool buttons. So the 
watches commands will be available in the watches dialog only.




The new configurable Coolbar (toolbars) are useless in the same sense.
None of the "View -> Debugger Windows" menu items can be added to any
toolbars in the IDE.


Well, these can easily be added. I remember telling on the issue tracker 
after I made this change to check whether all needed commands are 
listed. I got no answer :)


Ondrej

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


[Lazarus] Please stop the IDE regressions!

2016-02-24 Thread Graeme Geldenhuys
Hi,

The Editor Toolbar is loosing functionality again (just like Procedure
List did)! I had toolbar shortcuts for debug windows (eg: watches, call
stack etc). Now with Lazarus v1.6 and later you can't add those to the
Editor Toolbar. Why???

The new configurable Coolbar (toolbars) are useless in the same sense.
None of the "View -> Debugger Windows" menu items can be added to any
toolbars in the IDE.

Reverting back to Lazarus 1.5 r48959 x86_64-linux-gtk 2 where things
still worked.

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.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Microsoft Acquires Xamarin

2016-02-24 Thread Giuliano Colla



Il 24/02/2016 22:49, Mattias Gaertner ha scritto:

Skepticism: what software became better after acquisition by Microsoft?

This is quickly going off-topic.
If you want to answer this question please use fpc-other.

Or better alt.destroy.microsoft ;-)

Giuliano


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


Re: [Lazarus] Microsoft Acquires Xamarin

2016-02-24 Thread Mattias Gaertner
On Wed, 24 Feb 2016 15:59:06 -0500
Dmitry Boyarintsev  wrote:

> On Wed, Feb 24, 2016 at 3:16 PM, Anthony Walter  wrote:
> 
> > I expect their price to come down, maybe even into the free price range,
> > as a result of this acquisition.
> >
> 
> Skepticism: what software became better after acquisition by Microsoft?

This is quickly going off-topic.
If you want to answer this question please use fpc-other.

Mattias

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


Re: [Lazarus] Microsoft Acquires Xamarin

2016-02-24 Thread Anthony Walter
> Skepticism: what software became better after acquisition by Microsoft?

Flight Simulator
Direct3D
Halo

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


Re: [Lazarus] Microsoft Acquires Xamarin

2016-02-24 Thread Denis Kozlov

On 24/02/2016 20:59, Dmitry Boyarintsev wrote:

Skepticism: what software became better after acquisition by Microsoft?


This is bad news. Microsoft's top interest is likely to be in bundling 
Bing into Xamarin.


MonoDevelop might have to provide their own builds from now on.


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


Re: [Lazarus] Microsoft Acquires Xamarin

2016-02-24 Thread Dmitry Boyarintsev
On Wed, Feb 24, 2016 at 3:16 PM, Anthony Walter  wrote:

> I expect their price to come down, maybe even into the free price range,
> as a result of this acquisition.
>

Skepticism: what software became better after acquisition by Microsoft?

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


[Lazarus] Microsoft Acquires Xamarin

2016-02-24 Thread Anthony Walter
I think this is big news and of interest to our community since Xamarin
provides a cross platform IDE + Tookit. Also, of all the other (than
Delphi/Free Pascal) languages out there I feel C# is the next most
acceptable with proper PME/generics/other stuff.

http://weblogs.asp.net/scottgu/welcoming-the-xamarin-team-to-microsoft

I expect their price to come down, maybe even into the free price range, as
a result of this acquisition.
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Keys not recognized by Lazarus 1.6 code editor

2016-02-24 Thread Mark Morgan Lloyd

Bo Berglund wrote:


I entered the startlazarus command I have set up for Lazarus 1.6
release into the putty console after logging in and following starting
XMing on windows.
Amazingly I got the lazarus separate panels painted on top of my Win7
desktop but it was not possible to copy/paste or anything and the
windows were sluggish at best and could not be moved.


Craving managerial indulgence one last time...

Try it from a desktop Linux system. I've put a lot of work over the last 
six months or so into an RPi attached to an HDTV screen for a hacker 
with sight problems, the RPi didn't work but as soon as I upgraded to an 
RPi2 everything came to life. That allowed me to put together a desktop 
system running Debian (not Raspbian) at 3840 x 2160, that can SSH into 
arbitrary Linux/unix systems and put Lazarus etc. onto the full sized 
screen (i.e. not limited by the display resolution or size on the server 
system) with reliable cut-and-paste. I'm also able to run some Windows 
versions in Qemu hosted on x86-64, and get a desktop as a window on the 
big display at 2560 x 1600 which is rather better than any physical 
displays available here, although in this case there's no direct 
cut-and-paste.


So the end result was a damn big screen, able to run Lazarus etc. over 
SSH on any attached Linux/unix system, and able to run Windows in a 
Window. The really important thing is the SSH tunneling, and I've...



Better closing this discussion before we get purged from the list
Thanks for your suggestions.


..been saying that for months :-)

--
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] Keys not recognized by Lazarus 1.6 code editor

2016-02-24 Thread Bo Berglund
>> The displayed RPi desktop
>
>Stop right there. What you're describing there is doing a remote X11 
...
>
>What you should be doing is making sure that your SSH client (Putty or 
>whatever) is set up to tunnel X11 sessions, and that the SSH server on 
>the RPi is set up to make them available (it is on most distreaux).
>
>Then SSH into the RPi to get a shell, and run your Lazarus binary. At 
>that point the X11 messages originated by Lazarus are tunneled over the 
>SSH session, and the Lazarus windows/forms /should/ (if Putty+XMing 
>really does behave like SSH etc. does on unix) appear as separate 
>windows on your client system. What's more, /if/ things are working 
>properly, then cut-and-paste should work.
>
I entered the startlazarus command I have set up for Lazarus 1.6
release into the putty console after logging in and following starting
XMing on windows.
Amazingly I got the lazarus separate panels painted on top of my Win7
desktop but it was not possible to copy/paste or anything and the
windows were sluggish at best and could not be moved.
Better closing this discussion before we get purged from the list
Thanks for your suggestions.

-- 
Bo Berglund
Developer in Sweden


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


Re: [Lazarus] Lazarus 1.6 Object Inspector width, how to reduce?

2016-02-24 Thread Bo Berglund
On Wed, 24 Feb 2016 19:19:00 +0100, Bo Berglund
 wrote:
>A quick test:
>In 1.6RC2 the minimum width is about 233 pixels whereas in 1.6 it is
>more like 430 pixels. That is a rather big part of my total width...

It turns out tha the code editor has also been provided with a rather
big minimum width! It is such thta I cannot set the code editor and
Object Inspector to fit the screen side by side. THere is a big
overlap tha cannot be reduced.
How did this happen?


-- 
Bo Berglund
Developer in Sweden


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


[Lazarus] Lazarus 1.6 Object Inspector width, how to reduce?

2016-02-24 Thread Bo Berglund
I tried to make the Object Inspector panel width narrrower but it
seems like it has a minimum that cannot be reduced past.
Is this the case?

I really do not remember this happening pre-1.6 release.
I run Lazarus on a 1400x900 screen so I have to adapt the pane sizes
accordingly.

A quick test:
In 1.6RC2 the minimum width is about 233 pixels whereas in 1.6 it is
more like 430 pixels. That is a rather big part of my total width...


-- 
Bo Berglund
Developer in Sweden


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


Re: [Lazarus] Keys not recognized by Lazarus 1.6 code editor

2016-02-24 Thread Mark Morgan Lloyd

Bo Berglund wrote:

On Wed, 24 Feb 2016 17:44:58 +, Mark Morgan Lloyd
 wrote:

Discussion of the remote access side of things might be better continued 
in either fpc-other or lazarus-other. One of the list managers warned us 
some while ago that this was off-topic.


I know, but I started this again after seeing yet some glitches
directlty connected to the Lazarus code editor when using VNC. And
this was on the RELEASE version 1.6.
So I thought it to be on-topic then.


I agree, which is why I suggested that you raise it as a bug.


Of course now discussing how to set up various displays on an RPi
system might not qualify... ;-/

However, Gmane does not carry the "-other" mail lists on its news
mirror and I do all of my talking here through Gmane
Can't stand the email interface because I lose totally the overview
and threading offered by a news service.


Sorry, not my problem. (But I think fpc-other was added a few days ago, 
for the sake of the ifthen controversy).


--
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] Keys not recognized by Lazarus 1.6 code editor

2016-02-24 Thread Mark Morgan Lloyd

Bo Berglund wrote:

On Wed, 24 Feb 2016 15:40:15 +, Graeme Geldenhuys
 wrote:


On 2016-02-24 15:33, Bo Berglund wrote:

Or understand how the Raspbian desktop would land on the Win7 X
screen. :(

As far as I know you do get a X Server implementation for Windows too.
You would simply start that up, use Putty to SSH (with X11 port
forwarding enabled) to the RPi, and run the Lazarus executable on the
RPi. The Lazarus IDE should then appear on your Windows desktop.
Obviously things like "File - Open..." will display the content on the
RPi and not your Windows system - but that is normally desired anyway. ;-)

At least the above is how it works between my X11 based systems.

Regards,
 - Graeme -


I found this tutorial on how to use XMing with RPi:
http://www.raspians.com/Knowledgebase/how-to-remote-desktop-with-xming-and-putty/

It is a bit roundabout, occupying the console connection via PuTTY,
but it did work to bring up some form of X window on my screen.
The displayed RPi desktop


Stop right there. What you're describing there is doing a remote X11 
login to the display manager [qv] running on the RPi, which starts off a 
window manager [qv]. The window manager supplied as default by Raspbian 
assumes that it's running on an RPi, and won't like being accessed over 
the LAN from XMing which is fairly old code and lacks stuff added 
comparatively recently to X11.


WITH THE IMPORTANT CAVEAT THAT I'VE NOT DONE THIS MYSELF ON WINDOWS:

What you should be doing is making sure that your SSH client (Putty or 
whatever) is set up to tunnel X11 sessions, and that the SSH server on 
the RPi is set up to make them available (it is on most distreaux).


Then SSH into the RPi to get a shell, and run your Lazarus binary. At 
that point the X11 messages originated by Lazarus are tunneled over the 
SSH session, and the Lazarus windows/forms /should/ (if Putty+XMing 
really does behave like SSH etc. does on unix) appear as separate 
windows on your client system. What's more, /if/ things are working 
properly, then cut-and-paste should work.


AGAIN, THAT'S WHAT HAPPENS ON UNIX. MY UNDERSTANDING IS THAT THE 
COMBINATION OF PUTTY AND XMING SHOULD GIVE YOU SOMETHING COMPARABLE ON 
WINDOWS, BUT I'VE NOT DONE IT MYSELF.


With apologies to the list managers if this is considered off-topic.

--
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] Keys not recognized by Lazarus 1.6 code editor

2016-02-24 Thread Bo Berglund
On Wed, 24 Feb 2016 17:44:58 +, Mark Morgan Lloyd
 wrote:

>Discussion of the remote access side of things might be better continued 
>in either fpc-other or lazarus-other. One of the list managers warned us 
>some while ago that this was off-topic.

I know, but I started this again after seeing yet some glitches
directlty connected to the Lazarus code editor when using VNC. And
this was on the RELEASE version 1.6.
So I thought it to be on-topic then.
Of course now discussing how to set up various displays on an RPi
system might not qualify... ;-/

However, Gmane does not carry the "-other" mail lists on its news
mirror and I do all of my talking here through Gmane
Can't stand the email interface because I lose totally the overview
and threading offered by a news service.

-- 
Bo Berglund
Developer in Sweden


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


Re: [Lazarus] Keys not recognized by Lazarus 1.6 code editor

2016-02-24 Thread Mark Morgan Lloyd

Graeme Geldenhuys wrote:

On 2016-02-24 15:33, Bo Berglund wrote:

Or understand how the Raspbian desktop would land on the Win7 X
screen. :(


As far as I know you do get a X Server implementation for Windows too.
You would simply start that up, use Putty to SSH (with X11 port
forwarding enabled) to the RPi, and run the Lazarus executable on the
RPi. The Lazarus IDE should then appear on your Windows desktop.
Obviously things like "File - Open..." will display the content on the
RPi and not your Windows system - but that is normally desired anyway. ;-)


I'm not sure that Putty includes an X server, but it will interwork with 
 (not sure if this name is 100% accurate) XMingw32. That's one reason 
why I suggested starting off with an X11 (Linux etc.) desktop system as 
a client.


As an additional point but not directly relevant to SSH tunneling, I 
don't know whether the display manager (Bo, if you don't grok that see 
Wp) supplied as default with Raspbian allows remote logins. I've started 
using pukka Debian on an RPi2 with KDE hence KDM etc., which turns out 
to be better than Raspbian on several fronts.



At least the above is how it works between my X11 based systems.


Discussion of the remote access side of things might be better continued 
in either fpc-other or lazarus-other. One of the list managers warned us 
some while ago that this was off-topic.


--
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] Keys not recognized by Lazarus 1.6 code editor

2016-02-24 Thread Bo Berglund
On Wed, 24 Feb 2016 15:40:15 +, Graeme Geldenhuys
 wrote:

>On 2016-02-24 15:33, Bo Berglund wrote:
>> Or understand how the Raspbian desktop would land on the Win7 X
>> screen. :(
>
>As far as I know you do get a X Server implementation for Windows too.
>You would simply start that up, use Putty to SSH (with X11 port
>forwarding enabled) to the RPi, and run the Lazarus executable on the
>RPi. The Lazarus IDE should then appear on your Windows desktop.
>Obviously things like "File - Open..." will display the content on the
>RPi and not your Windows system - but that is normally desired anyway. ;-)
>
>At least the above is how it works between my X11 based systems.
>
>Regards,
>  - Graeme -

I found this tutorial on how to use XMing with RPi:
http://www.raspians.com/Knowledgebase/how-to-remote-desktop-with-xming-and-putty/

It is a bit roundabout, occupying the console connection via PuTTY,
but it did work to bring up some form of X window on my screen.
The displayed RPi desktop is very strange, though. Not at all the
Jessie desktop I am used to (example: black background and generally
strange looking). And it also seems like it decided that my keyboard
is a US layout, which is completely wrong of course.

When I launched Lazarus it shows up pretty well, but cannot be moved
inside the X window. And the X window itself cannot be moved on my
Win7 desktop either...
All-in-all it does not give me much improvement

Now I have to figure out how to get it off of my Win7 desktop...
It does not act as any other Windows application does regarding the
windowing.
Shutting down the Putty session eventually removes the X window but it
is still present on my taskbar but won't maximize anymore.
Will have to use Task Manager.


Later:
I also tried the RDP solution linked to from the page above:
http://www.raspberrypiblog.com/2012/10/how-to-setup-remote-desktop-from.html

This does not have the unfamiliarities of the X-ming solution but
instead the key eating was present there too...
So the < and + keys could not be used.
So the exact same keys were affected in the same way, strange eh?

And the clipboard worked even worse than with TightVNC.

Seems like I will have to stick with TightVNC for the time being.

-- 
Bo Berglund
Developer in Sweden


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


Re: [Lazarus] Keys not recognized by Lazarus 1.6 code editor

2016-02-24 Thread Sascha Hestermann
Am 24.02.2016 um 16:40 schrieb Mark Morgan Lloyd:
> Martin Frb wrote:
>> On 24/02/2016 13:10, Bo Berglund wrote:
>>> I have discovered a strange problem with my Lazarus 1.6 release
>>> installation on RPi2 (Raspbian Jessie) concerning keyboard entries.
>>>
>>> When I connect via VNC from my Windows7 PC I can not enter the
>>> characters < or + via the keyboard keys into the Lazarus code editor.
>>>
>> http://bugs.freepascal.org/view.php?id=17820
> 
> There was an issue in that era that keys like # when the systems were
> set to UK layout weren't getting through. I've not seen that for a
> while, but that could be because even I upgrade my OS and libraries on
> occasion :-)

I'm not sure whether this is the same issue as in the bug report, but
for me there has been a problem ever since I use Lazarus on Linux with a
"non mainstream" keyboard layout, which is for several years now. It was
behaving the same with Ubuntu years ago and currently I use a pretty up
to date archlinux, so for me it didn't change because of external libraries.
Dvorak has been mentioned and I'm using Neo (called Neo2 in most linux
distros). For me it is configured as the default layout in X11, tty and
my Xfce settings and I usually don't change it.

The issue for me is that some keys (even some single keystrokes) don't
work at all, do something different, or modifier keys seem to be
ignored, e.g. I can't type the letter 'ä', but strangely 'ö' works.

> 
>> I dont know if the issue is in the LCL, or in VNC.
>> Apparently the data received from VNC does only occur with VNC. Other
>> app may not have the issue, may simply mean that they do not check
>> this particular part of the data, independent of its correctness
> 
> I've definitely seen VNC issues affect (programs written using) Delphi.
> 

I have never tried Lazarus via VNC. For me the issue occurs when running
Lazarus just normal on the local X server. But it is only the SynEdit
component, which is affected. Other menus like preferences or
objectinspector work just like they should. And almost all other
programs like gedit, gnome-terminal, firefox, etc. don't have problems
either.

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


Re: [Lazarus] Keys not recognized by Lazarus 1.6 code editor

2016-02-24 Thread Mark Morgan Lloyd

Bo Berglund wrote:

On Wed, 24 Feb 2016 15:00:42 +, Martin Frb 
wrote:


On 24/02/2016 13:10, Bo Berglund wrote:

I have discovered a strange problem with my Lazarus 1.6 release
installation on RPi2 (Raspbian Jessie) concerning keyboard entries.

When I connect via VNC from my Windows7 PC I can not enter the
characters < or + via the keyboard keys into the Lazarus code editor.


http://bugs.freepascal.org/view.php?id=17820

I dont know if the issue is in the LCL, or in VNC.
Apparently the data received from VNC does only occur with VNC. Other 
app may not have the issue, may simply mean that they do not check this 
particular part of the data, independent of its correctness


Too bad then
I looked at the VNC client settings but there is nothing about the
keyboard. Obviously I could wire the Pi up to my monitor and hook up a
different keyboard and mouse for it and work that way. But it is
inconvenient since I then lose all of the normal activity on my Win7
desktop plus the ability to copy/paste between the windows.


I'd expect the VNC client to use the keyboard etc. settings on that 
computer.



And I don't have the multiple display setup that Graeme and Mark is
currently discussing on the fpc-other mail lits


Not really relevant, that's more to do with making it look as though 
multiple screens are attached to the same computer than anything else.



Maybe skipping VNC in favour of X could be a solution? But I tried
that when starting with the RPi2 dev system back in October and could
never even understand how it worked let alone find suitable software
for my Wind7 X64 laptop to work as an X server


I answered that at some point.


Or understand how the Raspbian desktop would land on the Win7 X
screen. :(


Who cares provided it works?


I will go to the RPi forum and ask people there about setting up X for
this purpose.


As I've said multiple times before, you'd do best tunneling one app over 
SSH rather than putting the entire desktop over [any of several ways of 
doing it]. You might find this easiest if you investigated an X11-based 
system o your desktop, rather than Windows... at least while you're 
working out what's possible and what suits your working arrangements.


--
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] Keys not recognized by Lazarus 1.6 code editor

2016-02-24 Thread Martin Frb

On 24/02/2016 15:33, Bo Berglund wrote:

On Wed, 24 Feb 2016 15:00:42 +, Martin Frb 
wrote:


On 24/02/2016 13:10, Bo Berglund wrote:

When I connect via VNC from my Windows7 PC I can not enter the
characters < or + via the keyboard keys into the Lazarus code editor.

http://bugs.freepascal.org/view.php?id=17820

I dont know if the issue is in the LCL, or in VNC.
Apparently the data received from VNC does only occur with VNC. Other
app may not have the issue, may simply mean that they do not check this
particular part of the data, independent of its correctness

Too bad then


It doesnt mean that it cant be fixed (or if broken in vnc: worked 
around) in lazarus. But no one has the time to work on it


And the time check IIRC is there for a reason.
I believe (from what I heard) there are cases where the event for the 
same keystroke can be received again, leading to duplicate input. The 
time field is a way to identify this. The key code can not be used, 
since event handlers can change it, and it would then be received with 
the new value.

I am not sure if the origin of the 2nd event would be the OS or LCL.

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


Re: [Lazarus] Keys not recognized by Lazarus 1.6 code editor

2016-02-24 Thread Graeme Geldenhuys
On 2016-02-24 15:33, Bo Berglund wrote:
> Or understand how the Raspbian desktop would land on the Win7 X
> screen. :(

As far as I know you do get a X Server implementation for Windows too.
You would simply start that up, use Putty to SSH (with X11 port
forwarding enabled) to the RPi, and run the Lazarus executable on the
RPi. The Lazarus IDE should then appear on your Windows desktop.
Obviously things like "File - Open..." will display the content on the
RPi and not your Windows system - but that is normally desired anyway. ;-)

At least the above is how it works between my X11 based systems.

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.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Keys not recognized by Lazarus 1.6 code editor

2016-02-24 Thread Mark Morgan Lloyd

Martin Frb wrote:

On 24/02/2016 13:10, Bo Berglund wrote:

I have discovered a strange problem with my Lazarus 1.6 release
installation on RPi2 (Raspbian Jessie) concerning keyboard entries.

When I connect via VNC from my Windows7 PC I can not enter the
characters < or + via the keyboard keys into the Lazarus code editor.


http://bugs.freepascal.org/view.php?id=17820


There was an issue in that era that keys like # when the systems were 
set to UK layout weren't getting through. I've not seen that for a 
while, but that could be because even I upgrade my OS and libraries on 
occasion :-)



I dont know if the issue is in the LCL, or in VNC.
Apparently the data received from VNC does only occur with VNC. Other 
app may not have the issue, may simply mean that they do not check this 
particular part of the data, independent of its correctness


I've definitely seen VNC issues affect (programs written using) Delphi.

--
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] Keys not recognized by Lazarus 1.6 code editor

2016-02-24 Thread Graeme Geldenhuys
On 2016-02-24 15:27, Mark Morgan Lloyd wrote:
> I don't see that as necessarily being a Lazarus problem, but Bo's 
> observation that simple text entry fields behave differently 

I can understand complex input as you described, but in my case the
issue was simply typing code in the code editor window. Press one
character (eg: "a") and another character will appear - or nothing appears.

I've gotten used to the issue though. Just restart Lazarus (which is
luckily quick to do) and then Lazarus IDE behaves correctly.

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.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Keys not recognized by Lazarus 1.6 code editor

2016-02-24 Thread Mark Morgan Lloyd

Graeme Geldenhuys wrote:

On 2016-02-24 13:10, Bo Berglund wrote:

I have discovered a strange problem with my Lazarus 1.6 release
installation on RPi2 (Raspbian Jessie) concerning keyboard entries.


I don't believe that is a new issue in Lazarus though, and not limited
to only VNC connections. For years I've had issues where if I changed my
keyboard layout of X11 via xmodmap, while Lazarus was running, then all
(most) keyboard input in Lazarus is screwed. Other running applications
continue to work fine, but Lazarus not. I have to close Lazarus down and
start it up again before keyboard input works correctly.

I don't know if this relates to VNC, but it might - as VNC (and RDP) can
do keyboard translations on the fly. eg: Me running Dvorak locally,
connecting to a system that has Qwerty setup. VNC and RDP automatically
makes the keystrokes for me, without me having to change the keyboard
layout of the remotely system.


VNC- both the standard xvnc4viewer and krdc as an alternative- has 
problems with some character mappings and combinations. This has long 
been an irritiation to me with both Delphi (on Windows) and Lazarus (on 
Linux or Solaris) since on occasion I've wanted to use a doubleclick 
plus two shift keys to get into a special "maven mode" for debugging 
etc., some combinations quite simply don't work with VNC while they're 
fine with e.g. X11 tunnelled over SSH.


I don't see that as necessarily being a Lazarus problem, but Bo's 
observation that simple text entry fields behave differently from the 
IDE editor- possibly because they don't have hooks for CodeTools etc.- 
is arguably a bug and perhaps should be raised as such on Mantis.


I think that your (Graeme) point about Dvorak etc. keyboards is really 
down to what software converts the keyboard (scan) codes into internal 
X11 codes. I had to dig around a little a few weeks ago when I needed to 
simulate a "Windows" key on a keyboard that didn't have one, but I don't 
pretend to really understand how the various tables etc. work.


--
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] Keys not recognized by Lazarus 1.6 code editor

2016-02-24 Thread Bo Berglund
On Wed, 24 Feb 2016 15:00:42 +, Martin Frb 
wrote:

>On 24/02/2016 13:10, Bo Berglund wrote:
>> I have discovered a strange problem with my Lazarus 1.6 release
>> installation on RPi2 (Raspbian Jessie) concerning keyboard entries.
>>
>> When I connect via VNC from my Windows7 PC I can not enter the
>> characters < or + via the keyboard keys into the Lazarus code editor.
>>
>http://bugs.freepascal.org/view.php?id=17820
>
>I dont know if the issue is in the LCL, or in VNC.
>Apparently the data received from VNC does only occur with VNC. Other 
>app may not have the issue, may simply mean that they do not check this 
>particular part of the data, independent of its correctness

Too bad then
I looked at the VNC client settings but there is nothing about the
keyboard. Obviously I could wire the Pi up to my monitor and hook up a
different keyboard and mouse for it and work that way. But it is
inconvenient since I then lose all of the normal activity on my Win7
desktop plus the ability to copy/paste between the windows.

And I don't have the multiple display setup that Graeme and Mark is
currently discussing on the fpc-other mail lits

Maybe skipping VNC in favour of X could be a solution? But I tried
that when starting with the RPi2 dev system back in October and could
never even understand how it worked let alone find suitable software
for my Wind7 X64 laptop to work as an X server
Or understand how the Raspbian desktop would land on the Win7 X
screen. :(

I will go to the RPi forum and ask people there about setting up X for
this purpose.

-- 
Bo Berglund
Developer in Sweden


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


Re: [Lazarus] Keys not recognized by Lazarus 1.6 code editor

2016-02-24 Thread Martin Frb

On 24/02/2016 13:10, Bo Berglund wrote:

I have discovered a strange problem with my Lazarus 1.6 release
installation on RPi2 (Raspbian Jessie) concerning keyboard entries.

When I connect via VNC from my Windows7 PC I can not enter the
characters < or + via the keyboard keys into the Lazarus code editor.


http://bugs.freepascal.org/view.php?id=17820

I dont know if the issue is in the LCL, or in VNC.
Apparently the data received from VNC does only occur with VNC. Other 
app may not have the issue, may simply mean that they do not check this 
particular part of the data, independent of its correctness


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


Re: [Lazarus] Problem with lazarus 1.6?

2016-02-24 Thread Frans

I've solved the problem but still don't know why.
I checked the installed package an noticed that LazCustForms was marked for installation but not yet 
installed.
As far as I knwo I do'nt use this, but I installed the package. And the next time I closed my 
project without problems. I've tried it several tmes and all is wel.

Bu why

mvg
Frans van Leeuwen
M 06-51695390

Op 22-02-2016 om 19:35 schreef Frans:

Hi.

A few days ago I installed lazarus 1.6. After adding some packages I use it works fine but for 2 
projects.
I can't close these two projects without a crash of Lazarus, showing the message 'Access 
violation' twice in a dlg with the title 'Readerror'. One project is the example htmhelpsample (in 
$(Lazarus)\examples\htmlhelp_ipro). The other project is my own. I don't have this problem in 
projects that don't use the component turbopower_ipro.
I've corrected the error in htmhelpsample by doing a Clean up and build. But the same action on my 
own project doe's do the trick.
I've noticed that compiled files in the wrong place can cause a problem but I've done a search and 
found nothing wrong.

Anyone an idea where to look?




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


Re: [Lazarus] Problem with lazarus + fpc-3.0.0 under windows 10

2016-02-24 Thread Zeljko



On 02/24/2016 03:20 PM, Zeljko wrote:

1.Fpc-3.0.0
2.Lazarus today trunk.
3.Windows 10 pro 64bit in vmware virtual machine

Builds fine, works fine. Now I'm trying to install dozen of my own
packages...last one is virtualtrees package, in message window I can see:
Linking lazarus... and then Fatal: no memory left

Tested with pure win32 and qt widgetsets under windows 10 pro.

So, anyone spotted such problem ? That works fine with fpc-2.6.4
(virtual machine also but with Win7 64 pro)
Is there any workaround ?


Sorry, it's not fpc-3.0.0 but fpc-3.1.1 from 18.01.2016 ... so I'll test 
tomorrow with 3.0.0 stable and see if error still exists.


zeljko

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


[Lazarus] Problem with lazarus + fpc-3.0.0 under windows 10

2016-02-24 Thread Zeljko

1.Fpc-3.0.0
2.Lazarus today trunk.
3.Windows 10 pro 64bit in vmware virtual machine

Builds fine, works fine. Now I'm trying to install dozen of my own 
packages...last one is virtualtrees package, in message window I can see:

Linking lazarus... and then Fatal: no memory left

Tested with pure win32 and qt widgetsets under windows 10 pro.

So, anyone spotted such problem ? That works fine with fpc-2.6.4 
(virtual machine also but with Win7 64 pro)

Is there any workaround ?


zeljko

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


Re: [Lazarus] Keys not recognized by Lazarus 1.6 code editor

2016-02-24 Thread Graeme Geldenhuys
On 2016-02-24 13:10, Bo Berglund wrote:
> I have discovered a strange problem with my Lazarus 1.6 release
> installation on RPi2 (Raspbian Jessie) concerning keyboard entries.

I don't believe that is a new issue in Lazarus though, and not limited
to only VNC connections. For years I've had issues where if I changed my
keyboard layout of X11 via xmodmap, while Lazarus was running, then all
(most) keyboard input in Lazarus is screwed. Other running applications
continue to work fine, but Lazarus not. I have to close Lazarus down and
start it up again before keyboard input works correctly.

I don't know if this relates to VNC, but it might - as VNC (and RDP) can
do keyboard translations on the fly. eg: Me running Dvorak locally,
connecting to a system that has Qwerty setup. VNC and RDP automatically
makes the keystrokes for me, without me having to change the keyboard
layout of the remotely system.

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.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


[Lazarus] Keys not recognized by Lazarus 1.6 code editor

2016-02-24 Thread Bo Berglund
I have discovered a strange problem with my Lazarus 1.6 release
installation on RPi2 (Raspbian Jessie) concerning keyboard entries.

When I connect via VNC from my Windows7 PC I can not enter the
characters < or + via the keyboard keys into the Lazarus code editor.
But it is working just fine if I type these characters into a property
of the form like Caption. Or any other tested place in Lazarus
accepting text input.

If I open the Raspbian default text editor there are no problems
entering these characters.

If I connect my monitor and keyboard directly to the RPi (a bit
awkward) then these characters can be entered into the code editor
too.

So what is Lazarus doing inside the code editor that makes it "eat"
some keyboard entries?

Note as I stated above that in all other parts of Lazarus where text
can be typed it records and shows the correct key entries...

On my keyboard the < key is the second key from left in the second row
from the bottom and the + key is the key following 0 on the top
numeric key row (not counting the F-key row).

If I type the + on the numeric keypad it registers correctly.

Is there some key filter in the IDE settings I have inadvertently set
wrong? It must be connected to the Lazarus code editor since
everywhere else keys enter properly.

Also:
Ctrl-C (Copy) does not work in the code editor either. But it works as
expected in Lazarus property editors and other places where text can
be put into the clipboard
Things I copy in Windows7 *can* be pasted in the code editor though.
So this is a one-directional problem.
And in other applications like the text editor copy/paste works
perfectly good.

-- 
Bo Berglund
Developer in Sweden


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


Re: [Lazarus] Lazarus Release 1.6

2016-02-24 Thread Kamen Ketev
Many thanks,
Mattias!
Regards,
Kamen
 








 > Оригинално писмо 

 >От: Mattias Gaertner nc-gaert...@netcologne.de

 >Относно: Re: [Lazarus] Lazarus Release 1.6

 >До: lazarus@lists.lazarus.freepascal.org

 >Изпратено на: 24.02.2016 12:01


On Wed, 24 Feb 2016 11:46:05 +0200 (EET)

Kamen Ketev  kamenl...@abv.bg > wrote:



> In which modul are

>  WinCPToUTF8 or CP1251ToUTF8? (   Error: Identifier not found "WinCPToUTF8")  



WinCPToUTF8 from unit LazUTF8 or CP1251ToUTF8 from unit LConvEncoding



 

> I want to make my application both on Windows and Linux.



The encoding of text files depends on what program you used to create

it. Windows applications usually create either system code page or

UTF-8, sometimes UTF-16 LE. Linux apps mostly UTF-8.

Maybe the function GuessEncoding from LConvEncoding can help.



> In Linux can I use the same functions or have any other? 

>  

> Is SysToUtf8 works on Linux? If I use encoding UTF-8 for the fail it works. 



You can use WinCPToUTF8 under Linux too. It simply keeps the UTF-8

there.



Mattias



--

___

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] SQLDb and TSQLQuery usage for MSSQL database...

2016-02-24 Thread Michael Van Canneyt



On Wed, 24 Feb 2016, Bo Berglund wrote:


On Wed, 24 Feb 2016 11:47:18 +0100 (CET), Michael Van Canneyt
 wrote:


You must additionally set

  FConn.Transaction:=FTrans;


Thank you so much

That single omission corrected fixed the problem!
This is my first ever database query execution from Lazaus on Linux
towards a Windows MSSQL Server database!

Now I can convert all of the other stuff as well (going from Delphi 7
to Lazarus 1.6 on Linux)


Congratulations :-)

Michael.

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


Re: [Lazarus] SQLDb and TSQLQuery usage for MSSQL database...

2016-02-24 Thread Bo Berglund
On Wed, 24 Feb 2016 11:47:18 +0100 (CET), Michael Van Canneyt
 wrote:

>You must additionally set
>
>   FConn.Transaction:=FTrans;

Thank you so much

That single omission corrected fixed the problem!
This is my first ever database query execution from Lazaus on Linux
towards a Windows MSSQL Server database!

Now I can convert all of the other stuff as well (going from Delphi 7
to Lazarus 1.6 on Linux)


-- 
Bo Berglund
Developer in Sweden


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


Re: [Lazarus] Clean and build as sudo?

2016-02-24 Thread Pedro Albuquerque
Lazarus (and fpc) was installed from the home page big button on the
right, with default setup:
https://sourceforge.net/projects/lazarus/files/Lazarus%20Linux%20i386%
20DEB/Lazarus%201.6/

I'll try installing from the packages you mention and pay some attention
to the installation folders. Thank you,
Pedro.

Qua, 2016-02-24 às 10:27 +0100, Mattias Gaertner escreveu:

> On Wed, 24 Feb 2016 07:00:28 +
> Pedro Albuquerque  wrote:
> 
> > Hi,
> > 
> > first post here, no coding for the last 25 years, first time with
> > Lazarus. Forgive me any inconvenience, please.
> > 
> > While building an application, I got this error:
> > 
> > mainwindow.pas(27,22) Error: Cannot find FileUtil used by MainWindow,
> > incompatible
> > ppu=/usr/share/lazarus/1.4.4/components/lazutils/lib/i386-linux/fileutil.ppu,
> >  package LazUtils
> 
> Probably your installed compiler (Free Pascal) and the Lazarus binaries
> do not match.
> How did you install Lazarus?
> 
> 
> > Should I run Lazarus as sudo? What are the risks?
> 
> Running and testing self written programs is risky, doing it as root
> can do havoc to your system.
> 
> > Lazarus v.1.4.4
> > Ubuntu 14.04 LTS
> 
> We provide newer Ubuntu packages (DEB) for FPC and Lazarus:
> https://sourceforge.net/projects/lazarus/files/?source=navbar
> 
> Mattias
> 
> --
> ___
> 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] SQLDb and TSQLQuery usage for MSSQL database...

2016-02-24 Thread Michael Van Canneyt



On Wed, 24 Feb 2016, Bo Berglund wrote:


In my previous thread I received help that made it possible for me to
connect from my RPi2 to an MSSQL database server on a Windows server
in the network using the TMSSQLConnection component.
So the connectivity seems fine.
(Using FPC 3.0.0 and Lazarus 1.6)

end;

constructor TUserDb.Create;
begin
 FConn := TMSSQLConnection.Create(NIL);
 FTrans := TSQLTransaction.Create(NIL);


You must additionally set

  FConn.Transaction:=FTrans;


 FQuery := TSQLQuery.Create(NIL);
 FQuery.DataBase := FConn; // <== Database property set here!!!
 FQuery.Transaction := FTrans;
end;


Michael.

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


Re: [Lazarus] Lazarus Release 1.6

2016-02-24 Thread Mattias Gaertner
On Wed, 24 Feb 2016 11:46:05 +0200 (EET)
Kamen Ketev  wrote:

> In which modul are
>  WinCPToUTF8 or CP1251ToUTF8? (   Error: Identifier not found "WinCPToUTF8")  

WinCPToUTF8 from unit LazUTF8 or CP1251ToUTF8 from unit LConvEncoding

 
> I want to make my application both on Windows and Linux.

The encoding of text files depends on what program you used to create
it. Windows applications usually create either system code page or
UTF-8, sometimes UTF-16 LE. Linux apps mostly UTF-8.
Maybe the function GuessEncoding from LConvEncoding can help.

> In Linux can I use the same functions or have any other? 
>  
> Is SysToUtf8 works on Linux? If I use encoding UTF-8 for the fail it works. 

You can use WinCPToUTF8 under Linux too. It simply keeps the UTF-8
there.

Mattias

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


Re: [Lazarus] Lazarus Release 1.6

2016-02-24 Thread Kamen Ketev
In which modul are
 WinCPToUTF8 or CP1251ToUTF8? (   Error: Identifier not found "WinCPToUTF8")  

I want to make my application both on Windows and Linux.
In Linux can I use the same functions or have any other? 
 
Is SysToUtf8 works on Linux? If I use encoding UTF-8 for the fail it works. 
Regards,
Kamen
 








 > Оригинално писмо 

 >От: Mattias Gaertner nc-gaert...@netcologne.de

 >Относно: Re: [Lazarus] Lazarus Release 1.6

 >До: lazarus@lists.lazarus.freepascal.org

 >Изпратено на: 24.02.2016 11:20


On Wed, 24 Feb 2016 08:39:40 +0200 (EET)

Kamen Ketev  kamenl...@abv.bg > wrote:



> 

> "What encoding has the text file? CP1251?"

> ANSI. Only this encoding worked with Lazarus 1.4. 

> "What function do you use for converting the strings to UTF-8?"

> SysToUtf8(s) 



SysToUTF8 was changed, because in the majority of cases it was used for

talking to the RTL.



You can use WinCPToUTF8 or CP1251ToUTF8 instead.



Mattias



--

___

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] Clean and build as sudo?

2016-02-24 Thread Bo Berglund
On Wed, 24 Feb 2016 07:00:28 +, Pedro Albuquerque
 wrote:

>After some investigation, I tried Clean and Build, with this error:
>
>Unable to delete file
>"/usr/share/lazarus/1.4.4/components/lazutils/lib/i386-linux/LazUtils.compiled".
>
>Should I run Lazarus as sudo? What are the risks?
>

I always install Lazarus as the user and inside user home where file
permissions are OK:
For example: ~/dev/lazarus/1.6

THen there are no problems when Lazarus needs to rebuild etc.


-- 
Bo Berglund
Developer in Sweden


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


[Lazarus] SQLDb and TSQLQuery usage for MSSQL database...

2016-02-24 Thread Bo Berglund
In my previous thread I received help that made it possible for me to
connect from my RPi2 to an MSSQL database server on a Windows server
in the network using the TMSSQLConnection component.
So the connectivity seems fine.
(Using FPC 3.0.0 and Lazarus 1.6)

Now I have a different problem regarding usage of the TSQLQuery
component, which does not currently work as expected:

I have read the tutorial in
http://wiki.freepascal.org/SqlDBHowto#Example:_reading_data_from_a_table
and tried to use it in creating a DB handler class for the
application.
The basics are as follows:

- Here is the current state of my DB handler class: ---

  TUserDb = class
  private
FConn: TMSSQLConnection;
FQuery: TSQLQuery;
FTrans: TSQLTransaction;
FDatabase,
FDBserver,
FDBLogin,
FDBPasswd: string;
FDBSet: boolean;
FLoginSet: boolean;
FPwdSet: boolean;
FServerSet: boolean;
FLastError: string;
procedure SetDatabase(AValue: string);
procedure SetLogin(AValue: string);
procedure SetPasswd(AValue: string);
procedure SetServer(AValue: string);
  public
property Database: string read FDatabase write SetDatabase;
property Server: string read FDBServer write SetServer;
property Login: string read FDBLogin write SetLogin;
property Passwd: string read FDBPasswd write SetPasswd;
constructor Create;
destructor Destroy; override;
function OpenConnection: boolean;
procedure CloseConnection;
function GetPasswordFile(var slPWD: TStringList): boolean;
  end;


implementation

{$R *.lfm}

{ TUserDb }

procedure TUserDb.SetDatabase(AValue: string);
begin
  if FDatabase=AValue then Exit;
  FDatabase:=AValue;
  FDBSet := true;
end;

procedure TUserDb.SetLogin(AValue: string);
begin
  if FDBLogin=AValue then Exit;
  FDBLogin:=AValue;
  FLoginSet := true;
end;

procedure TUserDb.SetPasswd(AValue: string);
begin
  if FDBPasswd=AValue then Exit;
  FDBPasswd:=AValue;
  FPwdSet := true;
end;

procedure TUserDb.SetServer(AValue: string);
begin
  if FDBServer=AValue then Exit;
  FDBServer:=AValue;
  FServerSet := true;
end;

constructor TUserDb.Create;
begin
  FConn := TMSSQLConnection.Create(NIL);
  FTrans := TSQLTransaction.Create(NIL);
  FQuery := TSQLQuery.Create(NIL);
  FQuery.DataBase := FConn; // <== Database property set here!!!
  FQuery.Transaction := FTrans;
end;

destructor TUserDb.Destroy;
begin
  FQuery.Free;
  FTrans.Free;
  FConn.Free;
  inherited Destroy;
end;

function TUserDb.OpenConnection: boolean;
begin
  Result := false;
  if not (FDBSet and FServerSet and FLoginSet and FPwdSet) then
  begin
FLastError := 'Missing connection parameter';
Exit;
  end;
  if FConn.Connected then
 CloseConnection;
  FConn.DatabaseName := FDatabase;
  FConn.HostName := FDBServer;
  FConn.UserName := FDBLogin;
  FConn.Password := FDBPasswd;
  try
FConn.Open;
Result := FConn.Connected;
  except
on E: Exception do
  FLastError := E.Message;
  end;
end;

procedure TUserDb.CloseConnection;
begin
  if FConn.Connected then
FConn.Close(true);
end;

function TUserDb.GetPasswordFile(var slPWD: TStringList): boolean;
var
  sSQL,
  sLogin,
  sPwd,
  sCryptPwd,
  sDup: string;
  slCheck, slFile: TStringList;
begin
  Result := false;
  sSQL := 'EXEC SelectPwdEntries';
  slPWD.Clear;
  slCheck := TStringList.Create;
  slFile := TStringList.Create;
  sDup := '';
  try
try
  if not OpenConnection then
  begin
Exit;
  end;
  FQuery.SQL.Text := sSQL;
  FQuery.Open; //<== Error exception here!!!
  if not FQuery.EOF then
  begin
FQuery.First;
repeat
  sLogin := FQuery.FieldByName('LoginName').AsString;
  sPwd := FQuery.FieldByName('Passwd').AsString;
  sCryptPwd := FQuery.FieldByName('CryptPwd').AsString;
  if (sLogin <> '') and (sPwd <> '') and (sCryptPwd > '') then
  begin
if slCheck.IndexOf(sLogin)<0 then //no duplicates
begin
  slCheck.Add(sLogin);
  slFile.Add(sLogin + ':' + sCryptPwd);
end
else
  sDup := sDup + #13 + sLogin;
  end;
  FQuery.Next;
until FQuery.EOF;
FQuery.Close;
CloseConnection;
if sDup <> '' then
  ShowMessage('Duplicated logins!'#13#10 + sDup);
slPWD.Text := slFile.Text;
Result := true;
  end;
except
  on E: Exception do
FLastError := E.Message;
end;
  finally
slCheck.Free;
slFile.Free;
  end;
end;


 On the form I have these related functions ---


procedure TForm1.FormClose(Sender: TObject; var CloseAction:
TCloseAction);
begin
  FDBHandler.Free;
end;

procedure TForm1.FormShow(Sender: TObject);
begin
  FDBHandler := TUserDb.Create;
end;

procedure TForm1.btnGetPwdFileClick(Sender: TObject);
var
  slPwd: TStringList;
begin
  FDBHandler.CloseConnection;
  FDBHandler.Database:= '';
  FDBHandler.Server:= '';
  FDBHandler.Login:= '';
  

Re: [Lazarus] Clean and build as sudo?

2016-02-24 Thread Mattias Gaertner
On Wed, 24 Feb 2016 07:00:28 +
Pedro Albuquerque  wrote:

> Hi,
> 
> first post here, no coding for the last 25 years, first time with
> Lazarus. Forgive me any inconvenience, please.
> 
> While building an application, I got this error:
> 
> mainwindow.pas(27,22) Error: Cannot find FileUtil used by MainWindow,
> incompatible
> ppu=/usr/share/lazarus/1.4.4/components/lazutils/lib/i386-linux/fileutil.ppu, 
> package LazUtils

Probably your installed compiler (Free Pascal) and the Lazarus binaries
do not match.
How did you install Lazarus?


> Should I run Lazarus as sudo? What are the risks?

Running and testing self written programs is risky, doing it as root
can do havoc to your system.

> Lazarus v.1.4.4
> Ubuntu 14.04 LTS

We provide newer Ubuntu packages (DEB) for FPC and Lazarus:
https://sourceforge.net/projects/lazarus/files/?source=navbar

Mattias

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


Re: [Lazarus] Lazarus Release 1.6

2016-02-24 Thread Mattias Gaertner
On Wed, 24 Feb 2016 08:39:40 +0200 (EET)
Kamen Ketev  wrote:

> 
> "What encoding has the text file? CP1251?"
> ANSI. Only this encoding worked with Lazarus 1.4. 
> "What function do you use for converting the strings to UTF-8?"
> SysToUtf8(s) 

SysToUTF8 was changed, because in the majority of cases it was used for
talking to the RTL.

You can use WinCPToUTF8 or CP1251ToUTF8 instead.

Mattias

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


Re: [Lazarus] Incompatibility: dynamic array and TStream

2016-02-24 Thread Graeme Geldenhuys
On 2016-02-24 02:59, Donald Ziesig wrote:
> and 
> I've been working for 14 hours so far. ;-)


Lucky you, for only having to work half-day. ;-)


Regards,
  - Graeme -


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


Re: [Lazarus] Clean and build as sudo?

2016-02-24 Thread Graeme Geldenhuys
On 2016-02-24 07:00, Pedro Albuquerque wrote:
> Unable to delete file
> "/usr/share/lazarus/1.4.4/components/lazutils/lib/i386-linux/LazUtils.compiled".
> 
> Should I run Lazarus as sudo? What are the risks?

You really shouldn't have lazarus installed in such a "shared" location
on your system. A normal user doesn't have write access, and no, I
wouldn't recommend you running Lazarus as root.

Uninstall and maybe use a different installation method so you can
choose the destination directory. I recommend installing Lazarus in
~/devel/lazarus/ for example - where you have write access. Then you
shouldn't have this problem again.

FPC is not so much a problem installed in a shared location, because
normally you don't need to rebuild FPC. But Lazarus IDE is another story
(eg: every time you install new components in the IDE, it requires a
rebuild).

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.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus