Re: [Lazarus] Does fsStayOnTop not work for forms on Linux?
> Is this property just a Windows feature? Certainly no, as it works on my Manjaro KDE, both fsStayOnTop and fsSystemStayOnTop. > Is this a problem with Ubuntu Mate 20.04? Could be, I don't use Mate and not all DEs are created equal (KDE also has its own quirks regarding stay on top, but LCL implementation works). -- Sent from: http://free-pascal-lazarus.989080.n3.nabble.com/ -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Best way to record a displayed video to file?
> What are my options to record a video playing in a web browser to a disk file (mp4) for later off-line viewing? Browser extension, but they can communicate with a native app. Take a look at Video DownloadHelper, they have both Chrome extension and a native downloader. I haven't checked how the extension communicates with the native downloader, though, but I suspect the extension is small enough to be examined. -- Sent from: http://free-pascal-lazarus.989080.n3.nabble.com/ -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Find in Files
> without regular expressions why make your own life difficult? regex is there for complex cases like this. -- Sent from: http://free-pascal-lazarus.989080.n3.nabble.com/ -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Find in Files
> without regular expressions why make your own life difficult? regex is there for complex cases like this. -- Sent from: http://free-pascal-lazarus.989080.n3.nabble.com/ -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Build Lazarus without symbols included?
> Is there a setting somewhere in Lazarus that will build lazarus itself > without the symbols, but still create symbols in projects built using > Lazarus? Tools->Configure build Lazarus->Options: -g- -CX -XXs -- Sent from: http://free-pascal-lazarus.989080.n3.nabble.com/ -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Switching Lazarus between fpc 3.2.0 and 3.0.4 - how to?
> Or do I need a complete installation Lazarus/Fpc for the two fpc versions? Just the FPC is enough. In Lazarus, you can make multiple build modes for each FPC version (set the compiler command right), respectively and set the configuration as default. That's as easy as Lazarus can get in its current state. -- Sent from: http://free-pascal-lazarus.989080.n3.nabble.com/ -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] The Problem with the Linux Desktop
> The model to download applications and install on a random distro+version simply doesn't exist on Linux. Snap, AppImage, Flatpak are purposely targeting this. It's partially successful, but as with many things in Linux, they're competing instead of working together. -- Sent from: http://free-pascal-lazarus.989080.n3.nabble.com/ -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Is LCL-GTK still possible?
> Am I correct, that the LCL widgetset should auto compile, even though my Lazarus IDE is compiled with LCL-GTK2? Yes, it should. I build my apps for both GTK2 and QT(4) using build modes in one go. My IDE stays at QT. Maybe activate clean before build? -- Sent from: http://free-pascal-lazarus.989080.n3.nabble.com/ -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Proud to announce..
> See it in action for yourself: > > https://idefix.freepascal.org/~michael/webcompiler/webcompiler.html Good work! A little bug, though: 1. Directly press Compile, it will be an error 2. Go to Load units tab, press Load default units 3. Press Compile again, Compiler Output will always contain "Fatal: Compilation aborted" until refreshed and correct steps are done (i.e. Load default units before Compile) -- Sent from: http://free-pascal-lazarus.989080.n3.nabble.com/ -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] How to build FPC/Lazarus from sources on Windows?
> If I want to build the 64 bit version, where should I then put the 64 bit binutils? Wherever -FD in your fpc.cfg points to (remember, fpc.cfg supports conditionals). > The suggested path c:\freepascal\binutils\i386-win32\ seems incorrect. Why not? The binutils itself could still be 32-bit while generating 64-bit binaries. Native 64-bit shouldn't be there, of course. -- Sent from: http://free-pascal-lazarus.989080.n3.nabble.com/ -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Exception handling in Linux?
> Now when testing I have experienced that Lazarus trows up an exception dialog when code inside such a construct is running The debugger by default catches all exceptions, handled or not, because it catches the exception before your handler (the except block). Configure exceptions to ignore in debugger options. > When I hit Continue I expect the code to run the except block but it does > not. There are too many possibilities, if you set a breakpoint in the LogDebug statement, after pressing continue, does the debugger stop there? -- Sent from: http://free-pascal-lazarus.989080.n3.nabble.com/ -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Use /dev/null for stdout
> I'd need to open both stdout and stderr as /dev/null. Both are represented as System.Text (or ObjPas.TextFile) named System.Output and System.StdErr respectively (There are also System.StdOut and System.ErrOutput as their alias, but it looks like they're not proper alias but rather different instances pointing to the same file), you can System.Close, Re-System.Assign to '/dev/null' at runtime (start of your program, maybe?) then Re-Rewrite them. From that point onwards, every call to Write[Ln](...) will write to /dev/null. -- Sent from: http://free-pascal-lazarus.989080.n3.nabble.com/ -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Building a C (or possibly C++) program into a Lazarus app
> what's the current situation and future plans of > Lazarus as far as Android is concerned? I see mention of Laz4Android in > e.g. http://wiki.lazarus.freepascal.org/Android_tutorial : is that > mainstream or is there some other preferred solution? Laz4Android is just a prepackaged Lazarus + FPC + Android NDK. You can create Android apps using Custom Drawn Interface, but it's very incomplete and non-native. I don't see any better way than LAMW right now, at least it's maintained, progressing, user requests are handled (quite fast), rather complete (just look at the demos, I don't think you need more than already provided components for most apps) and use native look and feel. -- Sent from: http://free-pascal-lazarus.989080.n3.nabble.com/ -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Building a C (or possibly C++) program into a Lazarus app
> I find myself wondering whether > they could be given a more friendly frontend by wrapping them in a > Lazarus app, with an on-screen keyboard similar to what's found on a > tablet etc. Sounds like my non-web hobby projects with Lazarus. > Is it possible to link a C or possibly C++ program into a Lazarus one by > simply calling its main() function? Has anybody actually done this? I don't do that, though. Even if technically possible, there are hidden stuffs you have to be aware of. main() is only a specification in C standard, where the user code starts. However, long before that, there's a startup mechanism specific to each implementation. In GCC, this is _start, absolutely non-portable. That's why the IMO better way is to communicate over pipes via TProcess. -- Sent from: http://free-pascal-lazarus.989080.n3.nabble.com/ -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] synedit markdown highlighter ?
> Is there a markdown highlighter for synedit available ? Nope, not even the original SynEdit project has it (there are at least 2 issues requesting it, one has an idea to make one based on HTML highlighter, but no real implementation yet). Same question was asked a couple of months ago in forum, was that you? It might be easy to write one, markdown is rather simple. The HTML highlighter can be used as a fallback if none of the current token + context matches any markdown construct. -- Sent from: http://free-pascal-lazarus.989080.n3.nabble.com/ -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Lazarus and Linked Lists
> There seems to be nothing in there for TLinkedList or anything else in the glinkedlist unit... Browse the tests instead, TLinkedList wasn't shipped with original fcl-stl, it was added later without documentation. -- Sent from: http://free-pascal-lazarus.989080.n3.nabble.com/ -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Lazarus and Linked Lists
> Is there any documentation on using this object? Doc: https://svn.freepascal.org/svn/fpc/tags/release_3_0_4/packages/fcl-stl/doc/main.pdf Examples: https://svn.freepascal.org/svn/fpc/tags/release_3_0_4/packages/fcl-stl/tests/ Don' you know you can browse that site up n down? -- Sent from: http://free-pascal-lazarus.989080.n3.nabble.com/ -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Converting a component package Delphi->Lazarus using built-in converter?
> Or is it just the converter that is havíng problems? In the package dialog, check "Register unit" for units containing Register procedure. I didn't remember the last time I converted a Delphi package, but it could be that the converter doesn't detect Register properly. -- Sent from: http://free-pascal-lazarus.989080.n3.nabble.com/ -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Google geocoding API help
> In the meantime I'm asking if anyone knows of a simple how-to or demo or example of just sending a street address through the Goggle API and just getting back LAT and LONG values {$H+} uses fphttpclient, fpjson, jsonparser; var Address: String; AddressData,LocationData: TJSONObject; begin Write('Enter an address: '); ReadLn(Address); AddressData := TJSONObject(GetJSON(TFPHTTPClient.SimpleGet('https://maps.googleapis.com/maps/api/geocode/json?address=' + Address + '=well, you have to use your own key, it is not free unfortunately'))); LocationData := TJSONObject(AddressData.FindPath('results[0].geometry.location')); WriteLn('Latitude : ',LocationData.Floats['lat']:1:16); WriteLn('Longitude: ',LocationData.Floats['lng']:1:16); end. No error checking is intended, I'll leave that up to you. Get your API key here: https://developers.google.com/maps/documentation/geocoding/get-api-key -- Sent from: http://free-pascal-lazarus.989080.n3.nabble.com/ -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] can't connect to Mysql database using TMysql57connection
> Project Moneyproject raised exception class 'ESQLDatabaseError ' with message > 'Server Connect Failed'. Check installed libmysql client version. -- Sent from: http://free-pascal-lazarus.989080.n3.nabble.com/ -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Cloning standard output to text file
> Sorry, I fail to see how I can use this with writeln to write to *both* > output and file at the same time. Maybe I miss something :-? {$mode objfpc}{$H+} uses Classes,SysUtils,StreamIO; type TDoubleStream = class(TFileStream) private FStdOut: TextFile; public constructor Create(const AFileName: string; Mode: Word); destructor Destroy; override; function Write(const Buffer; Count: longint): longint; override; end; constructor TDoubleStream.Create(const AFileName: string; Mode: Word); begin inherited Create(AFileName,Mode); AssignFile(FStdOut,''); // empty string = stdout Rewrite(FStdOut); end; destructor TDoubleStream.Destroy; begin CloseFile(FStdOut); inherited Destroy; end; function TDoubleStream.Write(const Buffer; Count: longint): longint; var p: PChar; begin Result := inherited Write(Buffer, Count); p := PChar(@Buffer); // safe assumption for standard output, I guess? while Count > 0 do begin System.Write(FStdOut,p^); Inc(p); Dec(Count); end; end; var ds: TStream; begin ds := TDoubleStream.Create('log.txt', fmCreate or fmOpenWrite); try AssignStream(Output,ds); Rewrite(Output); WriteLn('Hello!'); finally ds.Free; end; end. -- Sent from: http://free-pascal-lazarus.989080.n3.nabble.com/ -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] E,bedding a terminal window in Lazarus
> I am considering writing an IDE package to do this, but wanted to know if anyone knows if this has been done before AFAIK, no. Previous attempts don't embed actual terminal, but use a terminal like component with application controlled command to execute. -- Sent from: http://free-pascal-lazarus.989080.n3.nabble.com/ -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] AT assembler syntax
> Any suggestions on how to make it work? Open View->Debug Windows->Debug Output, is your -eval-command parameter passed to gdb? -- Sent from: http://free-pascal-lazarus.989080.n3.nabble.com/ -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] SQLdb_Tutorial3 error
> Any hint? Code please. Zipped project directory (use Publish Project feature) is OK if single file example is not possible. -- Sent from: http://free-pascal-lazarus.989080.n3.nabble.com/ -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] IDE needs lexers JSON, XML
> IMO it's good to install JSON/XML syntaxes in IDE. many apps have res in such formats Isn't it already there? I don't remember, though, but my Lazarus has them already. -- Sent from: http://free-pascal-lazarus.989080.n3.nabble.com/ -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Package filenames with _package
> It is good filenames, with _package suffix, easy to see filenames from all filenames in big dir I don't agree, that's what file extension is for. Filtering and sorting should easily be done to distinguish package files from others. -- Sent from: http://free-pascal-lazarus.989080.n3.nabble.com/ -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] lazarus-ccr (or other) TBufDataSet Documentation?
> So far I have had no success. Do I have to use the source alone? I think there's none officially, but google gives me these: - http://wiki.lazarus.freepascal.org/How_to_write_in-memory_database_applications_in_Lazarus/FPC - http://www.pp4s.co.uk/main/tu-db-bufdataset.html -- Sent from: http://free-pascal-lazarus.989080.n3.nabble.com/ -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] DeleteFile
> Hi! I have a CGI program that must delete files from a server and it's owned by www-data which allows me to read a file but not to delete it, even though the file has permissions 777. The folder containing the files I want to delete has permissions "drwxrwxrwx" and it's owned by "root:root" and it's files has the same characteristics. Well, that requires a deeper inspection. Try inspecting return value of SysErrorMessage(GetLastOSError) after a failed deletion. -- Sent from: http://free-pascal-lazarus.989080.n3.nabble.com/ -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] How to enable Code outline feature of the IDE
> It took me a while too :-). Guess somebody needs to update this page: http://wiki.freepascal.org/New_IDE_features_since :) -- Sent from: http://free-pascal-lazarus.989080.n3.nabble.com/ -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] lazopenglcontext on Raspberry Pi?
> Is there a Raspberry Pi distribution that contains the lazopenglcontext package, or some method to get that package installed on the Raspberry Pi? Should be in components folder. -- Sent from: http://free-pascal-lazarus.989080.n3.nabble.com/ -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Packages and units with the same name
> I know how it works in a single program, but I thought that using > packages could be different... but not. Packages is Lazarus concept, the compiler has no idea about it at all. What Lazarus does with it is generate a unit with the same name as the .lpk containing all units belonging to the package in its uses clause (with additional Register procedure and initialization section containing RegisterPackage call, purely for linking with the IDE), then feed the compiler with it. The end result is no different than compiling the units manually. In the end, when used by a program, it's the same combinations of .o and .ppu pair that the compiler sees. -- Sent from: http://free-pascal-lazarus.989080.n3.nabble.com/ -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Packages and units with the same name
> Is it not possible *today* or never? Never, not without changing the way compiler manages units. FPC units are organized in folders for easier management at filesystem level, but filesystem is not the namespace, there can never be /first/path/to/a.pas and /second/path/to/a.pas used in a single program, because only that a identifies the unit, not the path to it. This is the same as you can't have two files with the same name under the same path. Indeed you can't control unit names written by 3rd party and collision might happen, so most package developers add prefix in their unit names (e.g. IdGlobals) or use the new dotted unit names (e.g. my.globals.types, your.globals.consts). > So, the main program shouldn't know nothing about "private units" that > belongs only for the package. That is encapsulation too. Pascal unit is THE namespace, while most other languages uses filesystem as namespace. Namespace don't have visibility, only its contents have. -- Sent from: http://free-pascal-lazarus.989080.n3.nabble.com/ -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Delphi, Kylix or Lazarus multi-form DB app example
> What I meant to add to that is that I find it very strange that no such demos are available. After all, in a real-world business case (and even personal) you would hardly ever write a single form database app. Because that defeats the purpose of a demo project: to introduce a feature in as simple as possible way (although some demos like the openglcontrol one is indeed quite complex, but the complexity comes from the opengl code, not how to use the control). After all, single or multi form doesn't differ much, it's just the way you structure your project. Rather than searching for demo, you can just search for a real application using queries like: "(written OR created OR made OR programmed OR coded) (in OR using OR with) lazarus" (quotes included). -- Sent from: http://free-pascal-lazarus.989080.n3.nabble.com/ -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] [ANN] Xavier for XML — Compatible with FPC and Delphi
Free Pascal - Lazarus mailing list wrote > Hi, > > I'm working in my new "pet project" called Xavier. > Xavier is an object-oriented library for work with XML. > > The motives and announcement is on the forum: > http://forum.lazarus.freepascal.org/index.php/topic,38343.0.html Apart from not needing to free memory and simpler nodes retrieval, I can't really see any difference with DOM. I was expecting some kind of DSL to work with XML in a declarative way, but unfortunately it still looks imperative. -- Sent from: http://free-pascal-lazarus.989080.n3.nabble.com/ -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] MariaDB, SQLConnection - Suse vs Debian
> But when I attempt to access the databases from my project the MySQL 5.6 connector throws an error: "Cannot work with installed MySQL Client version; got 5.5.0 expected 5.6" > > Using TMySQL55Connection doesn't work either: there is a more general > error message, basically "unable to connect". > > Identical dev. environment, code and databases - what's different? MariaDB 10.0 indeed maps to MySQL 5.6. But the installed client library is of version 5.5.0, which the connector refuse to use due to version difference. Install the same version for both client and server. -- View this message in context: http://free-pascal-lazarus.989080.n3.nabble.com/Lazarus-MariaDB-SQLConnection-Suse-vs-Debian-tp4050639p4050643.html Sent from the Free Pascal - Lazarus mailing list archive at Nabble.com. -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org http://lists.lazarus-ide.org/listinfo/lazarus