[Lazarus] How to install lazvlc?

2019-05-07 Thread Bo Berglund via lazarus
I would like to add a video player to my Lazarus program (currently on Windows using Laz 2.0.0). I have browsed through the article "Displaying video files using Free Pascal and Lazarus", which I found here: https://www.freepascal.org/~michael/articles/lazvlc/lazvlc.pdf Other web references also

Re: [Lazarus] How to install lazvlc?

2019-05-07 Thread Bo Berglund via lazarus
On Tue, 7 May 2019 09:41:39 +0200 (CEST), Michael Van Canneyt via lazarus wrote: >> Lazarus users can install the lazvlc package. >> >> But I can not find where one can obtain this package... > >It's available in the lazarus installation: > >lazarus/components/vlc/lazvlc.lpk > Or rather I found

Re: [Lazarus] How to install lazvlc?

2019-05-08 Thread Bo Berglund via lazarus
On Tue, 07 May 2019 12:15:35 +0200, Bo Berglund via lazarus wrote: >On Tue, 7 May 2019 09:41:39 +0200 (CEST), Michael Van Canneyt via >lazarus wrote: > >>> Lazarus users can install the lazvlc package. >>> >>> But I can not find where one can obtain this p

Re: [Lazarus] How to install lazvlc?

2019-05-09 Thread Bo Berglund via lazarus
On Thu, 9 May 2019 08:57:53 +0200 (CEST), Michael Van Canneyt via lazarus wrote: >> Unfortunately (for me) the lazvlc package is not graphical so I cannot >> use it in RAD fashion... > >What do you mean by this ? >It's a component you can drop on a form, and on which you can set properties. >Is

Re: [Lazarus] How to install lazvlc?

2019-05-09 Thread Bo Berglund via lazarus
On Thu, 09 May 2019 08:30:12 +0200, Bo Berglund via lazarus wrote: >This made it possible for me to create my videoplayer and it works OK >for the level of functionality described in the blog. > >I have run into difficulties trying to implement incremental position >move button

[Lazarus] TTrackBar alternative allowing slider move by clicking the bar?

2019-05-09 Thread Bo Berglund via lazarus
I am navigating a video using a TTrackBar component using an example from a blogpost. It works well to drag the handle and reposition the video when the handle is released. But I cannot for the life of me figure out how to set the handle position by clicking on the bar *outside* of the handle

[Lazarus] Lazarus throws error when trying to open an event procedure from the form

2019-05-11 Thread Bo Berglund via lazarus
FPC 3.0.4 / Lazarus 2.0.0 32 bit on Windows 7 x64 A project that builds without errors or warnings throws up an error dialog whenever in order to see its event function I do: 1) Doubleclick a button in the form view 2) Select the button, then use the events tab in object inspector to open OnClick

Re: [Lazarus] Lazarus throws error when trying to open an event procedure from the form

2019-05-12 Thread Bo Berglund via lazarus
On Sun, 12 May 2019 08:59:33 +0200, Ondrej Pokorny via lazarus wrote: >It's already been reported: https://bugs.freepascal.org/view.php?id=35289 > Thanks for the info! So I checked the ticket when I had the same problem reappear again today. Turns out that when the problem is "active" I tested (

[Lazarus] PasLibVlc error handling?

2019-05-13 Thread Bo Berglund via lazarus
Does anyone here know how to make PasLibVlc supply an error code or error message when an error occurs? I have implemented the event OnMediaPlayerEncounteredError in order to check what is happening. So in this event handler I just display the vlcPlayer.LastError and it is always an empty string..

Re: [Lazarus] PasLibVlc error handling?

2019-05-13 Thread Bo Berglund via lazarus
On Mon, 13 May 2019 14:37:32 +0200, Bo Berglund via lazarus wrote: > >Does anyone here know how to make PasLibVlc supply an error code or >error message when an error occurs? >I have implemented the event OnMediaPlayerEncounteredError in order to >check what is happening. S

[Lazarus] TBitBtn image, how to make background transparent?

2019-05-13 Thread Bo Berglund via lazarus
I am trying to make a bitmap image for a TBitBtn button such that the background of the image will be transpoarent and therefore the button color will be visible. But I don't succeed with this, the background I use for the image is visible on the button. Even if I set the same color as the buttonf

Re: [Lazarus] TBitBtn image, how to make background transparent?

2019-05-13 Thread Bo Berglund via lazarus
On Mon, 13 May 2019 22:41:32 +0200, Ondrej Pokorny via lazarus wrote: >On 13.05.2019 22:36, Bo Berglund via lazarus wrote: >> I am trying to make a bitmap image for a TBitBtn button such that the >> background of the image will be transpoarent and therefore the button >>

[Lazarus] TProgressbar moves slowly, is there a hidden setting for faster response?

2019-05-15 Thread Bo Berglund via lazarus
I am trying to use a TProgressbar to display the position of a playing video. This works OK while playing. Now I want to reposition the video by clicking on the progress bar and it does work, but the bar progress to the new position when clicking is really slow When I click the bar the X posi

Re: [Lazarus] TProgressbar moves slowly, is there a hidden setting for faster response?

2019-05-15 Thread Bo Berglund via lazarus
On Wed, 15 May 2019 13:38:19 +0200, Ondrej Pokorny via lazarus wrote: >On 15.05.2019 13:34, Bo Berglund via lazarus wrote: >> Why is the TProgressBar doing this when the TTrackBar I used before displays >> an instant move? > >Because WinAPI developers wanted it so - the dr

Re: [Lazarus] TProgressbar moves slowly, is there a hidden setting for faster response?

2019-05-15 Thread Bo Berglund via lazarus
On Wed, 15 May 2019 13:38:19 +0200, Ondrej Pokorny via lazarus wrote: >Because WinAPI developers wanted it so - the drawing of TProgressBar is >fully in charge of the OS. Strangely just discovered that the progressbar is painted "fast enough" if I click a position towards the lower side of the

Re: [Lazarus] TProgressbar moves slowly, is there a hidden setting for faster response?

2019-05-15 Thread Bo Berglund via lazarus
On Wed, 15 May 2019 17:13:48 +0200, Ondrej Pokorny via lazarus wrote: >> I really do not want to create a panel child to implement this >> behaviour unless I am really forced to > >That's what I would do. (But not a panel child but a TGraphicControl >descendant.) After thinking a bit on the

Re: [Lazarus] TProgressbar moves slowly, is there a hidden setting for faster response?

2019-05-16 Thread Bo Berglund via lazarus
On Wed, 15 May 2019 17:20:04 +0200, Sven Barth via lazarus wrote: >One possible workaround I found (not tested) is this: > >=== code begin === > >YourProgressbar.Position := YourTarget; >YourProgressbar.Position := Your Target - 1; >YourProgressbar.Position := YourTarget; > >=== code end === > >Y

[Lazarus] Hints not working - what is wrong?

2019-05-19 Thread Bo Berglund via lazarus
32 bit Lazarus 2.0.0, Fpc 3.0.4 on Windows 7 x64 I have tried in vain to make hints show up in the GUI of my application. I have set the hint strings for TButton, TBitBtn and TSpeedButton items via Object Inspector in the Lazarus IDE but nothing displays when I hover the mouse ove these items when

Re: [Lazarus] Hints not working - what is wrong?

2019-05-19 Thread Bo Berglund via lazarus
On Sun, 19 May 2019 22:36:25 +0200, Bart via lazarus wrote: >On Sun, May 19, 2019 at 10:13 PM Bo Berglund via lazarus > wrote: > >> Do I need to set some project property to make them appear? > >Set ShowHint to True? Thanks, I found it as a property of the form on which t

[Lazarus] Compile time varies dependiong on usage, why?

2019-05-25 Thread Bo Berglund via lazarus
Lazarus 2.0.0 / FPC 3.0.4 (both 32 bit) on Windows 7-x64 When I am working on my project and for example make a small change like moving a few controls on the form, then build the executable (Run/Compile) the time taken to complete varies a LOT as follows: 1) I have not done anything inside Lazar

Re: [Lazarus] Compile time varies dependiong on usage, why?

2019-05-26 Thread Bo Berglund via lazarus
On Sun, 26 May 2019 08:54:23 +0200 (CEST), Michael Van Canneyt via lazarus wrote: >So it looks like you're simply observing the effects of the Windows filesystem >cache. If you compile regularly, the filesystem cache is filled with files >that the compiler needs and compiling goes fast. If you d

[Lazarus] How to switch a project from 32 to 64 bit (on Windows 7 x64)?

2019-05-27 Thread Bo Berglund via lazarus
I started out on a project using Lazarus/Fpc 32 bit (2.0.0/3.0.4) and now I want to switch to the 64 bit version of Lazarus/Fpc. I have installed both 32 and 64 bit versions using the downloadable installers so they are separate programs in their separate folder trees. I thought that I could start

Re: [Lazarus] How to switch a project from 32 to 64 bit (on Windows 7 x64)?

2019-05-27 Thread Bo Berglund via lazarus
On Mon, 27 May 2019 17:49:31 +0200, Bo Berglund via lazarus wrote: >Since I have both installed on my laptop it would be nice to be able >to manage both 32 and 64 bit versions from the same environment, if >possible. I found the following method: Build modes can be used to handle this

Re: [Lazarus] How to switch a project from 32 to 64 bit (on Windows 7 x64)?

2019-05-28 Thread Bo Berglund via lazarus
On Tue, 28 May 2019 07:13:36 +, Patrick Chevalley via lazarus wrote: >This is easy to do that, you only need one Lazarus, the 64bit version and the >cross-i386 fpc compiler, you can remove Lazarus 32. >The only point to be careful is the default target for a new project will be >Win64 and y

Re: [Lazarus] How to switch a project from 32 to 64 bit (on Windows 7 x64)?

2019-05-28 Thread Bo Berglund via lazarus
On Tue, 28 May 2019 09:13:32 +, Patrick Chevalley via lazarus wrote: >I don't know your workflow and why you keep the old version of Lazarus? >for maintenance of older version of your applications? Not really, I tend to instal the latest version now and then and so I build up a library of ol

Re: [Lazarus] How to switch a project from 32 to 64 bit (on Windows 7 x64)?

2019-05-28 Thread Bo Berglund via lazarus
On Tue, 28 May 2019 11:03:36 +, Patrick Chevalley via lazarus wrote: >It is probably possible to cross compile from Windows to Linux (Gtk2) but this >is difficult to setup because you need to copy a lot a Linux library to your >Windows system. >I don't know if Fpcupdeluxe can help with tha

Re: [Lazarus] Now Available Raspberry Pi 4

2019-06-30 Thread Bo Berglund via lazarus
On Tue, 25 Jun 2019 06:35:40 +0100, Graeme Geldenhuys via lazarus wrote: >I still think the RPi is an amazing accomplishment. My old company has >done some amazing things with the original RPi v1's (I still have one too). > Me too! I think I have 10+ RPi units now, probably from all versions incl

[Lazarus] Lazarus 2.0.2 EditorMacroScript error on first startup RPi4B

2019-07-09 Thread Bo Berglund via lazarus
I have just installed fpc 3.0.4 + Lazarus 2.0.2 from svn sources on a pristine Raspberry Pi4B with 4GB RAM. All of the commands my script performs finished OK and the IDE is installed without errors. But now (again) on a first ever start of the newly installed Lazarus I am greeted by a pop-up dial

[Lazarus] How can I see what has changed in my project?

2019-07-31 Thread Bo Berglund via lazarus
I have Lazarus 2.0.2 from 2019-04-13 x86_64-win64-win32/win64 (from help/about) on a Windows 7 x64 laptop. I have opened a project I worked on a few weeks ago in order to check some implementation detail, then left it sitting untouched for a few days. As far as I can recall there was no changes ma

Re: [Lazarus] How can I see what has changed in my project?

2019-08-01 Thread Bo Berglund via lazarus
On Thu, 1 Aug 2019 09:30:38 +0200, Mattias Gaertner via lazarus wrote: >> How can I find out what Lazarus thinks has changed > >Maybe here: >View / IDE Internals / About IDE / Modified > Thanks, I went there and this is what the pane showed: Project.SomethingModifie

Re: [Lazarus] How can I see what has changed in my project?

2019-08-01 Thread Bo Berglund via lazarus
On Thu, 1 Aug 2019 10:58:28 +0200, Mattias Gaertner via lazarus wrote: >> What does this mean? > >"formmain.pas Modified" means something in formmain.pas was modified. > >Check for any yellow line markers in the source editor indicating an >edit. It turns out that the formmain.lfm file had many

[Lazarus] How to get space before auto-inserted assignment?

2019-08-16 Thread Bo Berglund via lazarus
I am used to having whitespace between names and operators, but Lazarus insists on putting := directly after a property when it autocompletes. So I get Canvas.Brush:= instead of Canvas.Brush := Which is what I want. It is annoying to get unwanted help which every time has to be corrected Presu

Re: [Lazarus] How to get space before auto-inserted assignment?

2019-08-16 Thread Bo Berglund via lazarus
On Fri, 16 Aug 2019 10:22:40 +0100, Howard Page-Clark via lazarus wrote: >> Presumably this is an IDE setting, but which? >> >> I am using Lazarus 2.0.4 on Windows 7. > >Tools->Options dialog > >In the treeview select the Codetools node, and Space page > >"Insert space in front of" the Symbol che

[Lazarus] Canvas.Rectangle question

2019-08-16 Thread Bo Berglund via lazarus
I would like to know if the rectangle drawn by a Canvas.Rectangle(Rect) call will be sized according to Rect inside of the bounding line or the outside of line? Say the rectangle is (10,4, 30,14) and the Pen.Wdth is set to 2, is the resulting shape 20 x 10 or 24 x 14 in size? -- Bo Berglund Dev

Re: [Lazarus] Canvas.Rectangle question

2019-08-16 Thread Bo Berglund via lazarus
On Fri, 16 Aug 2019 18:27:02 +0100, Graeme Geldenhuys via lazarus wrote: >On 16/08/2019 4:20 pm, Bo Berglund via lazarus wrote: >> Say the rectangle is (10,4, 30,14) and the Pen.Wdth is set to 2, is >> the resulting shape 20 x 10 or 24 x 14 in size? > >This is why fpGUI uses

Re: [Lazarus] Lazarus 2.0.2 EditorMacroScript error on first startup RPi4B

2019-08-16 Thread Bo Berglund via lazarus
On Tue, 9 Jul 2019 19:39:23 +0200, Martin Frb via lazarus wrote: >On 09/07/2019 19:03, Bo Berglund via lazarus wrote: >> I have just installed fpc 3.0.4 + Lazarus 2.0.2 from svn sources on a >> pristine Raspberry Pi4B with 4GB RAM. >> >> But now (again) on a fi

Re: [Lazarus] Lazarus 2.0.2 EditorMacroScript error on first startup RPi4B

2019-08-16 Thread Bo Berglund via lazarus
On Fri, 16 Aug 2019 23:02:57 +0200, Martin Frb via lazarus wrote: > >That is on a new install. Not on an update, correct? It is a new x64 install on Windows 7-x64 using the official installer downloaded via the link in the release message. I installed a secondary installation so I can keep the o

Re: [Lazarus] Lazarus 2.0.2 EditorMacroScript error on first startup RPi4B

2019-08-17 Thread Bo Berglund via lazarus
On Fri, 16 Aug 2019 23:57:51 +0200, Martin Frb via lazarus wrote: >On 16/08/2019 23:34, Bo Berglund via lazarus wrote: >> On Fri, 16 Aug 2019 23:02:57 +0200, Martin Frb via lazarus >> wrote: >> >>> That is on a new install. Not on an update, correct? >> It i

Re: [Lazarus] Automatic identifier completion

2019-08-17 Thread Bo Berglund via lazarus
On Fri, 16 Aug 2019 22:55:45 +0200, Martin Frb via lazarus wrote: >On 16/08/2019 19:07, Darius Blaszyk via lazarus wrote: >> Hi, >> >> I know about code completion in the IDE and it works perfectly! >> However, to invoke it I need to press CRTL-space every time which is >> somewhat cumbersome.

Re: [Lazarus] Lazarus 2.0.2 EditorMacroScript error on first startup RPi4B

2019-08-17 Thread Bo Berglund via lazarus
On Sat, 17 Aug 2019 11:41:01 +0200, Martin Frb via lazarus wrote: >>> I did not get what issue happens on win64? What is missing? >I still do not know what error you get on win7/64 bit Exactly the same as on RPi as I described on my first post in this thread back in July 9: Error in Ed

Re: [Lazarus] Lazarus 2.0.2 EditorMacroScript error on first startup RPi4B

2019-08-17 Thread Bo Berglund via lazarus
On Sat, 17 Aug 2019 14:12:02 +0200, Martin Frb via lazarus wrote: >On 17/08/2019 14:00, Martin Frb via lazarus wrote: >> >> Could you apply the following patch please: >> https://github.com/User4martin/lazarus/commit/5fa7fac42bb55d23b9654984be1e2e1c08049709 > >Or the patch/commit from latest tru

Re: [Lazarus] Lazarus 2.0.2 EditorMacroScript error on first startup RPi4B

2019-08-17 Thread Bo Berglund via lazarus
On Sat, 17 Aug 2019 16:43:38 +0200, Martin Frb via lazarus wrote: >I attached a ready to go replacement file. >Make a copy of your original >   components/macroscript/emsselftest.pas >and then put the attached file into it. Done! >Tools > Option > editor macro script : "Test again" This button

Re: [Lazarus] Lazarus 2.0.2 EditorMacroScript error on first startup RPi4B

2019-08-17 Thread Bo Berglund via lazarus
On Sat, 17 Aug 2019 18:43:01 +0200, Martin Frb via lazarus wrote: >On 17/08/2019 18:23, Bo Berglund via lazarus wrote: >> On Sat, 17 Aug 2019 16:43:38 +0200, Martin Frb via lazarus >> wrote: >> >>> I attached a ready to go replacement file. >>> Make a

Re: [Lazarus] Lazarus 2.0.2 EditorMacroScript error on first startup RPi4B

2019-08-18 Thread Bo Berglund via lazarus
On Sun, 18 Aug 2019 01:27:12 +0200, Martin Frb via lazarus wrote: >I build an installer for 2.0.5 (which does include the extra verbosity) >/ 64 bit only > >https://sourceforge.net/projects/lazarus-snapshots/files/test/ >lazarus-2.0.5-61719-fpc-3.0.4-20190817-win64.exe > Downloaded and installe

Re: [Lazarus] Lazarus 2.0.2 EditorMacroScript error on first startup RPi4B

2019-08-18 Thread Bo Berglund via lazarus
On Sat, 17 Aug 2019 16:43:38 +0200, Martin Frb via lazarus wrote: >I attached a ready to go replacement file. >Make a copy of your original >   components/macroscript/emsselftest.pas >and then put the attached file into it. > >Tools > Option > editor macro script : "Test again" >    (this deletes

Re: [Lazarus] Lazarus 2.0.2 EditorMacroScript error on first startup RPi4B

2019-08-18 Thread Bo Berglund via lazarus
On Sun, 18 Aug 2019 14:21:30 +0200, Martin Frb via lazarus wrote: >If you want to go on trying to see if we can find anything, then please >open >   components\macroscript\emscriptclasses.pas >around line 555 >replace TEmsSynWrapper.EMS_SearchReplace >with: > >function TEmsSynWrapper.EMS_SearchR

Re: [Lazarus] Lazarus 2.0.2 EditorMacroScript error on first startup RPi4B

2019-08-18 Thread Bo Berglund via lazarus
On Sun, 18 Aug 2019 22:51:31 +0200, Martin Frb via lazarus wrote: >On 18/08/2019 21:19, Bo Berglund via lazarus wrote: >> >> Parameter type not implemented! >> >So on arm that explains the error. >It does not implement passing a set as param (must be set, since str

Re: [Lazarus] Lazarus 2.0.2 EditorMacroScript error on first startup RPi4B

2019-08-18 Thread Bo Berglund via lazarus
On Mon, 19 Aug 2019 00:46:18 +0200, Martin Frb via lazarus wrote: >Also on either system. After the error happens once, that is stored in >the config. Unless you remove your config each time that you install, >you should never see the error again. >To verify that, you can (after the error) chec

[Lazarus] TListView - how to make selected line stay selected?

2019-08-19 Thread Bo Berglund via lazarus
I have a dialog which is used to enable changing the order of certain items. The items are displayed in a TListView component in report mode, each item occupies one line and shows several properties in the columns. Now I want to be able to select the row (list.Rowselect = true) when clicking on it.

Re: [Lazarus] TListView - how to make selected line stay selected?

2019-08-19 Thread Bo Berglund via lazarus
On Mon, 19 Aug 2019 18:21:06 +0200, Bo Berglund via lazarus wrote: >How can this be accomplished? I ended up adding the code below after reading this: http://delphidabbler.com/articles?article=16 procedure TfrmEditCuts.lvCutListCustomDrawItem(Sender: TCustomListView; Item: TListItem; St

Re: [Lazarus] TListView - how to make selected line stay selected?

2019-08-19 Thread Bo Berglund via lazarus
On Tue, 20 Aug 2019 00:01:38 +0200, Werner Pamler via lazarus wrote: >Did you set HideSelection to false? Did not know it existed... Set to true by default. But when I unchecked it and tried to skip the code I showed it did not work. When I returned to the listview the selected item was unselect

[Lazarus] Cross-platform project. Font sizes not the same....

2019-08-20 Thread Bo Berglund via lazarus
I have just transfered a simple 3-form project from Windows7 to Linux (Raspbian on RPi4). I am using the same versions of Fpc and Lazarus on both (3.0.4 and 2.0.4). The project compiled fine after the transfer to Raspbian as it did on Windows. But the form is very much in need of control changes

Re: [Lazarus] Cross-platform project. Font sizes not the same....

2019-08-22 Thread Bo Berglund via lazarus
On Tue, 20 Aug 2019 23:47:39 +0200, Bo Berglund via lazarus wrote: >I can go into the font property of affected controls and change the >font size to make it look better, but there are so many... In fact there are not that many controls so I tried to do the following on Windows: pro

[Lazarus] How to connect to MariaDB/mySql database from fpc/Lazarus?

2019-08-26 Thread Bo Berglund via lazarus
I am going to write a small application to access a mySql database from our website. The database has been exported to an SQL file and imported into a local MariaDB running on a Raspberry Pi4 on our network. Now I want to access it from my Windows 7 environment via Lazarus (not inside the editor b

Re: [Lazarus] How to connect to MariaDB/mySql database from fpc/Lazarus?

2019-08-26 Thread Bo Berglund via lazarus
On Mon, 26 Aug 2019 21:53:38 +0200, Bo Berglund via lazarus wrote: Do you need to install mySql on the client machine in order to connect with the MariaDB database on the server machine? I have not installed any database engine except for MSSQLServer on my Windows7 computer. >A working

Re: [Lazarus] How to connect to MariaDB/mySql database from fpc/Lazarus?

2019-08-26 Thread Bo Berglund via lazarus
On Mon, 26 Aug 2019 23:39:47 +0200 (CEST), Michael Van Canneyt via lazarus wrote: >If you have a choice of database, choose something else. >MariaDB/MySQLDB are the probably the worst choices you can make. >Postgres, Firebird, SQLIte: all better choices, depending on your use case. > Well it so

Re: [Lazarus] How to connect to MariaDB/mySql database from fpc/Lazarus?

2019-08-27 Thread Bo Berglund via lazarus
On Tue, 27 Aug 2019 07:51:16 +0200 (CEST), Michael Van Canneyt via lazarus wrote: >> So the database server is not really a choice I can make. > >That's why I started with 'if you have a choice'. > >MySQL by itself is not a very good database, but connecting to it from >FPC/Lazarus is even worse.

Re: [Lazarus] How to connect to MariaDB/mySql database from fpc/Lazarus?

2019-08-27 Thread Bo Berglund via lazarus
On Tue, 27 Aug 2019 09:36:02 +0200, Bo Berglund via lazarus wrote: >I will look into the possibility of importing the MySql dump into >MSSQLServer, after all it is in SQL format and our tables are not >really very complex either. I went over the SQL produced by a PhpMyAdmin export an

Re: [Lazarus] Too large height of TEdit and TSpinEdit in xfce

2019-09-15 Thread Bo Berglund via lazarus
On Mon, 16 Sep 2019 00:29:58 + (UTC), Haruyuki Fujimaki via lazarus wrote: >Hello everyone, >I am maintaining my softwares in xfce desktop system (Linux Lite). >The height of TEdit and TSpinEdit controls becomes awkwardly too >large as shown in attached screenshot. >By setting AutoSize := Fa

Re: [Lazarus] Too large height of TEdit and TSpinEdit in xfce

2019-09-16 Thread Bo Berglund via lazarus
On Mon, 16 Sep 2019 09:24:40 +0200, Salvatore Coppola via lazarus wrote: >Ok it is a workaround but why not call your function only one time at start >for instance in main form create? Yes, a typical workaround... I am so used to using OnShow since my form always is only shown once and never hi

[Lazarus] Environment monitoring software on Linux?

2019-09-26 Thread Bo Berglund via lazarus
I am looking for some advice on how best to approach my project... I have to create monitoring control software that will run on a Linux computer (Raspberry Pi) and will be responsible for controlling a few measure systems to take readings at regular intervals and saving/forwarding the results. Th

Re: [Lazarus] Environment monitoring software on Linux?

2019-09-26 Thread Bo Berglund via lazarus
On Thu, 26 Sep 2019 13:00:59 -0400, wkitty42--- via lazarus wrote: >On 9/26/19 11:12 AM, Bo Berglund via lazarus wrote: >> Is cron the best way or is there some similar function like the >> Windows services one can easily create? > >generally speaking, cron is the equivale

Re: [Lazarus] Environment monitoring software on Linux?

2019-09-26 Thread Bo Berglund via lazarus
On Thu, 26 Sep 2019 23:25:45 +0200, Bart via lazarus wrote: >On Thu, Sep 26, 2019 at 11:16 PM Bo Berglund via lazarus > wrote: > >> If the measure process takes longer than until the next cron >> invocation due to some extra delays in that particular process, then I

[Lazarus] Multi-platform console application, how to handle file paths?

2019-10-29 Thread Bo Berglund via lazarus
I am writing a console application intended to be portable between Windows and Linux and it uses files on the file system for configuration and also for processing data. Since the path delimiter is different on Unix and Windows I believe I have to handle this in my code, but how? I could create a

Re: [Lazarus] Multi-platform console application, how to handle file paths?

2019-10-29 Thread Bo Berglund via lazarus
On Tue, 29 Oct 2019 14:32:18 +0300, Mehmet Erol Sanliturk via lazarus wrote: >In Windows XP , it is possible to use "/" instead of "\" . Therefore , it >is NOT necessary to make two different file path representations . I am not >using any Windows now , therefore I can not say anything about last

Re: [Lazarus] Multi-platform console application, how to handle file paths?

2019-10-29 Thread Bo Berglund via lazarus
On Tue, 29 Oct 2019 12:43:51 +0100 (CET), Michael Van Canneyt via lazarus wrote: >1. Don't hardcode '/' or '\', use the PathDelim constant instead. >You will not need any ifdefs. The whole thing is that paths might be read from config or other data files and so they will come in either with

Re: [Lazarus] Multi-platform console application, how to handle file paths?

2019-10-30 Thread Bo Berglund via lazarus
On Wed, 30 Oct 2019 10:50:39 +0100, Mattias Gaertner via lazarus wrote: >Windows knows specials paths starting with '\\'. But I don't! :( What is special with these? I have noted tghat if I spell a path wrong (copy paste or oterwise) and get two \\ instead of one it still works fine. But maybe t

[Lazarus] Problem installing package from OLPM on Raspbian

2019-10-30 Thread Bo Berglund via lazarus
The system I have is running Raspbian Buster on an RPi4B with 4GB RAM. I use FPC 3.0.4 and Lazarus 2.0.4 Today I was going to transfer a project from Windows to Raspbian through Subversion and then I needed to install some dependencies into Lazarus too. Specifically I used Online Package Manager f

Re: [Lazarus] Problem installing package from OLPM on Raspbian

2019-10-30 Thread Bo Berglund via lazarus
On Wed, 30 Oct 2019 23:17:08 +0100, Bo Berglund via lazarus wrote: >At this point the IDE is still visible on screen but totally >unresponsive, cannot even be closed and no menus respond to mouse >clicks. And it is repeatable too... If I kill the lazarus process launched from Lazarus t

Re: [Lazarus] Problem installing package from OLPM on Raspbian

2019-10-31 Thread Bo Berglund via lazarus
On Wed, 30 Oct 2019 23:17:08 +0100, Bo Berglund via lazarus wrote: >What is the cause of this problem and what can I do to solve it? > >Kill lazarus via terminal or what? So this is what I did to get the system running: - killed lazarus so it was not running in hanged state - In a t

[Lazarus] Lazarus program runs fine in a Terminal but not in a PuTTY session, why?

2019-10-31 Thread Bo Berglund via lazarus
I am working on a program intended to be run by cron in unattended mode on a Raspberry Pi without GUI installed. I started it in Windows but have now moved the sources over to Raspbian for building on that platform and it does not work as expected... If I open a terminal window inside the Raspbia

Re: [Lazarus] Lazarus program runs fine in a Terminal but not in a PuTTY session, why?

2019-10-31 Thread Bo Berglund via lazarus
On Thu, 31 Oct 2019 11:06:17 +0100, Bo Berglund via lazarus wrote: >I am working on a program intended to be run by cron in unattended >mode on a Raspberry Pi without GUI installed. > >I started it in Windows but have now moved the sources over to >Raspbian for building on that

Re: [Lazarus] Lazarus program runs fine in a Terminal but not in a PuTTY session, why?

2019-10-31 Thread Bo Berglund via lazarus
On Thu, 31 Oct 2019 11:26:26 +0100 (CET), Michael Van Canneyt via lazarus wrote: > > >On Thu, 31 Oct 2019, Bo Berglund via lazarus wrote: > >> On Thu, 31 Oct 2019 11:06:17 +0100, Bo Berglund via lazarus >> wrote: >> >>> I am working on a program intended t

Re: [Lazarus] Lazarus program runs fine in a Terminal but not in a PuTTY session, why?

2019-11-01 Thread Bo Berglund via lazarus
On Thu, 31 Oct 2019 23:04:50 +, Graeme Geldenhuys via lazarus wrote: >Hi Bo, > >On 31/10/2019 10:02 pm, Michael Van Canneyt via lazarus wrote: >> If the 'interfaces' unit is in the uses clause of your program, try >> removing it. > > >In addition to what Michael said, you can also run >`ldd /

Re: [Lazarus] Lazarus Release 2.0.6

2019-11-01 Thread Bo Berglund via lazarus
On Fri, 1 Nov 2019 12:20:54 +0100, Mattias Gaertner via lazarus wrote: >The Lazarus team is glad to announce the release of Lazarus 2.0.6. > >This release was built with FPC 3.0.4. THanks for the upgrade! I have downloaded the sources via svn and am building bigide on Rasdpberry Pi4 as I write t

[Lazarus] Lazarus 2.0.6 IDE suddenly disappeared losing a lot of edits...

2019-11-01 Thread Bo Berglund via lazarus
I installed Lazarus 2.0.6 a few hours ago into a fully updated Raspbian Buster on an RPi4B 4GB system. Interfacing to it using RealVNC to my Windows7 laptop. I opened the current project and checked that it would build etc. No problems. Then I started write a section of description comments at th

Re: [Lazarus] Lazarus 2.0.2 EditorMacroScript error on first startup RPi4B

2019-11-01 Thread Bo Berglund via lazarus
On Tue, 17 Sep 2019 22:27:13 +0200, Martin Frb via lazarus wrote: >Can you please retest with >Revision: 61896 >Date: 17 September 2019 22:21:38 >EditorMacroScript: Use "internal" (none-native) calling for object methods > >Making sure you remove your editormacroscript.xml file, or re-request >t

Re: [Lazarus] Lazarus 2.0.6 IDE suddenly disappeared losing a lot of edits...

2019-11-02 Thread Bo Berglund via lazarus
On Sat, 2 Nov 2019 06:00:44 +0100, Ondrej Pokorny via lazarus wrote: >On 01.11.2019 23:03, Martin Frb via lazarus wrote: >> Well and a "autosave" feature might be nice, but needs to be written... > >The project is always automatically saved when you compile it. > Yes, I know that and it works fi

[Lazarus] Lazarus code editor improvement?

2019-11-02 Thread Bo Berglund via lazarus
When I am working on a multi-unit application I very often want to check the implementation of a function which is called from somewhere. So I right click the function name in the code line and select "Find Declaration of " This brings me invariably to the interface section function declaration f

Re: [Lazarus] Lazarus 2.0.6 IDE suddenly disappeared losing a lot of edits...

2019-11-02 Thread Bo Berglund via lazarus
On Fri, 1 Nov 2019 23:03:16 +0100, Martin Frb via lazarus wrote: >> I have never before encountered a crash like this, could it be because >> the IDE is so "fresh out of the presses"? >Good question "why". That can't be answered easily. And the issue could >be new or old. > >Unfortunately more i

Re: [Lazarus] Lazarus code editor improvement?

2019-11-02 Thread Bo Berglund via lazarus
On Sat, 02 Nov 2019 11:10:32 +0100, Bo Berglund via lazarus wrote: I just found another strange IDE "feature": If I am in a tab to the right (not the left-most tab) with the cursor anywhere in the code and I want to add say a { character, I need to press AltGr (the right hand Alt key)

Re: [Lazarus] Lazarus code editor improvement?

2019-11-02 Thread Bo Berglund via lazarus
On Sat, 2 Nov 2019 15:04:15 +0100, Sven Barth via lazarus wrote: >Bo Berglund via lazarus schrieb am Sa., 2. >Nov. 2019, 14:59: > >> On Sat, 02 Nov 2019 11:10:32 +0100, Bo Berglund via lazarus >> wrote: >> >> I just found another strange IDE "feature"

Re: [Lazarus] Lazarus code editor improvement?

2019-11-02 Thread Bo Berglund via lazarus
On Sat, 2 Nov 2019 15:42:54 +0100, Martin Frb via lazarus wrote: >Alt - n (1-9) is "goto source editor n" (switch to tab n) >Why this triggers on altgr for you, I am not sure OK, but then where in Key Mappings do I find it so I can disable it? It is very confusing for me not having used these be

Re: [Lazarus] Lazarus code editor improvement?

2019-11-03 Thread Bo Berglund via lazarus
On Sat, 2 Nov 2019 17:46:09 +0100 (CET), Michael Van Canneyt via lazarus wrote: >> I myself had reported something similar with VNC, so it's indeed likely to >> be the culprit. > >Yes. I've found Lazarus or any LCL app to be unworkable with VNC :( Yes, now that you mention it... I had a similar

[Lazarus] Why is there a define switch UseCThreads?

2019-11-10 Thread Bo Berglund via lazarus
I have ported a console application from Windows to Linux (Raspbian Buster) and I got to wonder about the check for a defined symbol appearing in the beginning of the code as produced by the Lazarus template: uses {$IFDEF UNIX}{$IFDEF UseCThreads} cthreads, {$ENDIF}{$ENDIF} Would it not be

Re: [Lazarus] Why is there a define switch UseCThreads?

2019-11-10 Thread Bo Berglund via lazarus
On Mon, 11 Nov 2019 00:20:59 +0100, Sven Barth via lazarus wrote: >Bo Berglund via lazarus schrieb am So., 10. >Nov. 2019, 23:29: > >> I have ported a console application from Windows to Linux (Raspbian >> Buster) and I got to wonder about the check for a defined symbo

Re: [Lazarus] Why is there a define switch UseCThreads?

2019-11-11 Thread Bo Berglund via lazarus
On Mon, 11 Nov 2019 08:59:43 +0100, zeljko via lazarus wrote: >On 11/10/19 11:29 PM, Bo Berglund via lazarus wrote: >> I have ported a console application from Windows to Linux (Raspbian >> Buster) and I got to wonder about the check for a defined symbol >> appearing in the

[Lazarus] FPC interface for reading I2C devices on Raspberry Pi?

2019-11-12 Thread Bo Berglund via lazarus
I would like to be able to communicate on the I2C bus from my FPC/Lazarus programs on Raspberry Pi. There are at least two cases: 1) Reading devices like RTC chips and other sensors. 2) Reading/writing data stored in EEPROM chips Since the Raspbian system is a Debian Linux derivative I am hoping

Re: [Lazarus] FPC interface for reading I2C devices on Raspberry Pi?

2019-11-12 Thread Bo Berglund via lazarus
On Tue, 12 Nov 2019 10:11:49 +0100, Bo Berglund via lazarus wrote: >I would like to be able to communicate on the I2C bus from my >FPC/Lazarus programs on Raspberry Pi. > >There are at least two cases: >1) Reading devices like RTC chips and other sensors. >2) Reading/writ

[Lazarus] Why is setlength not allowed?

2019-11-15 Thread Bo Berglund via lazarus
I am trying to write a simple I2C interface program for Raspberry Pi but I am getting an error I don't understand... function TRaspiI2C.ReadI2CBytes(addr: integer; count: integer; buf: array of byte): integer; var i: integer; begin try if count <> length(buf) then SetLength (buf, cou

Re: [Lazarus] Lazarus code editor improvement?

2019-11-16 Thread Bo Berglund via lazarus
On Sun, 3 Nov 2019 13:31:21 +0100, Joe via lazarus wrote: >> So indeed it is connected with VNC, but it also is connected with >> Lazarus' code editor window. It seems like this is the only affected >> window on the RPi, all others accept the composition key AltGr as part >> of entering a special

Re: [Lazarus] Why is setlength not allowed?

2019-11-16 Thread Bo Berglund via lazarus
On Sat, 16 Nov 2019 09:20:28 +0100 (CET), Michael Van Canneyt via lazarus wrote: > > >On Sat, 16 Nov 2019, Bo Berglund via lazarus wrote: > >> I am trying to write a simple I2C interface program for Raspberry Pi >> but I am getting an error I don't

Re: [Lazarus] Why is setlength not allowed?

2019-11-16 Thread Bo Berglund via lazarus
On Sat, 16 Nov 2019 11:50:45 +0100 (CET), Michael Van Canneyt via lazarus wrote: >> I guess that the reason is that fpIoCtrl expects a pointer type >> variable so the typecast is done... Is there no alternative? > >The warning seems correct. I suspect Pointer(iDevAddr) is probably wrong. >Maybe

[Lazarus] Installer/uninstaller on Linux for fpc/lazarus programs?

2019-11-23 Thread Bo Berglund via lazarus
I am wondering how exactly I should package the program I am developing for Raspberry Pi so it can be uniformly installed and uninstalled on new RPi units... It is an Arm binary for RPi3 or Rpi4 type units running Raspbian Buster. So I could stuff the binary into /usr/bin I suppose, but it also ne

[Lazarus] How to deploy fpc/lazarus programs on Linux?

2019-11-23 Thread Bo Berglund via lazarus
Posting again since I think that by selection of subject was not wise the fisrt time, using words that might trigger scanners... My post did not come through. Anyway: I am wondering how exactly I should package the program I am developing for Raspberry Pi so it can be uniformly installed and unins

Re: [Lazarus] Lazarus 2.0.6 IDE suddenly disappeared losing a lot of edits...

2019-11-23 Thread Bo Berglund via lazarus
On Sat, 2 Nov 2019 15:37:23 +0100, Martin Frb via lazarus wrote: >On 02/11/2019 14:48, Bo Berglund via lazarus wrote: >> >> Now it happened again! >> I was compiling the program then executing it inside a terminal >> (external to Lazarus) and then repeating this t

[Lazarus] Cross-compile on Windows for Linux Raspbian (Raspberry Pi) - what are the requirements?

2019-11-24 Thread Bo Berglund via lazarus
I have tried to develop my RPi4 application on the RPi4 itself but have problems with Lazarus IDE crashing suddenly and inexplicably when just using the IDE, losing all unsaved changes. So I have now tried to find a way to develop on Windows 7 (my laptop) and check build for Raspbian there, but no

Re: [Lazarus] Lazarus 2.0.6 IDE suddenly disappeared losing a lot of edits...

2019-11-24 Thread Bo Berglund via lazarus
On Sun, 24 Nov 2019 03:21:11 +0100, Martin Frb via lazarus wrote: >On 24/11/2019 01:30, Bo Berglund via lazarus wrote: >> And I have been bitten several times the last days by the suddenly >> disappearing Lazarus application > >If you can Run your Lazarus in gdb. >

Re: [Lazarus] The future of the Lazarus IDE

2019-11-24 Thread Bo Berglund via lazarus
On Sat, 23 Nov 2019 18:50:07 -0500, Daithi Haxton via lazarus wrote: >For my 2 cents, keep Lazarus as an independent, native code IDE. We do >instrumentation packages for manufacturing robots, and “the Web” is simply not >an option. Laz makes us at least 10x more productive than any other optio

Re: [Lazarus] Lazarus 2.0.6 IDE suddenly disappeared losing a lot of edits...

2019-11-24 Thread Bo Berglund via lazarus
On Sun, 24 Nov 2019 14:46:11 +0100, Martin Frb via lazarus wrote: >On 24/11/2019 10:22, Bo Berglund via lazarus wrote: >> On Sun, 24 Nov 2019 03:21:11 +0100, Martin Frb via lazarus >> wrote: >>> If you can Run your Lazarus in gdb. >>>    gdb path/to/laza

<    1   2   3   4   5   6   7   >