freepascal

Is there a Delphi/FreePascal BitTorrent library?

I'm doing a feed reader type of application for torrents. Something to give you a sound when it's sitting in the tray and a new torrent shows up on one of your categories of choice. This will be done in Delphi or FreePascal when it's solid. My question is due to the possible need to integrate a BT client in the future. ...

A Delphi/FreePascal lib or function that emulates the PHP's function parse_url

I'm doing a sitemap producer in Object Pascal and need a good function or lib to emulate the parse_url function on PHP. Does anyone know of any good ones? ...

Is it possible to deliver cross-platform binaries of FreePascal using only one host OS ?

I'm doing a little app that I want to distribute in different platforms, at least the 3 major ones. Is it possible to use only Windows has the host OS to compile the binaries for Linux, Mac OS X and other supported platforms without resorting to virtual machines? Or should I ask around in some community to help me compile on, well OS X...

What's the best library for manipulating JPEG metadata?

I'm after a library that can read and write JPEG image metadata. For example if I wanted to embed and read back a short description or story relating to the jpeg image, in the image file itself, what development library/s would you recommend? I'm not too fussed about what language (it's a new project), though I've tagged this question f...

Casting between parent and child classes in delphi.

I'm writing some software that targets two versions of very similar hardware which, until I use the API to initialize the hardware I'm not able to know which type I'll be getting back. Because the hardware is very similar I planned to have a parent class (TParent) that has some abstract methods (for where the hardware differs) and then...

Linux linker flag -lXi not finding lib when compiling Lazarus code

After I solved my first problem I got into another one. Looks like I'm missing some kind of library, making the linker complain that the -lXi is not working. I've included most of the Xorg devel packages, what more do I need? ...

Compile linux program from mac OS X with FreePascal

I want to build a command-line tool in FPC for run in a Suse 9. This is a production server and is hard get aproved to install anything apart this tool. I code on Leopard and wonder if is possible cross-compile from here to linux. The server run on Xeon. ...

Is it possible to declare a const of an array in BOTH Delphi and FreePascal without having the elements be constants?

A long time ago I remember I could do this in Turbo Pascal 7. Maybe I'm wrong and it's something I need to clarify, but is it possible to declare an array of strings as a constant? If not what's the option/workaround. What I have now is: type TStates = (sOne, sTwo, sThree); var TArrayOfString: array [sOne..sThree] of string = ...

Most common docblock for Delphi and/or FreePascal code

I'm quite familiar with PHP dockblocks since it's been my job for the last 15+ years. /** * Description * * @tag bla bla * @tag more bla bla */ What I'm trying to understand is if there is a standard like that for Delphi and/or FreePascal. From my analysis on an awful lot of code I never seen any, but I could be dead wrong....

Any lib for multi-threading cross-platform for Delphi AND FreePascal?

I'm aware of some Windows Thread Libs for Delphi(OmniThread Lib, BMThreads, etc). But is there a lib that is built to be cross-platform and that can both be used under Delphi and FreePascal? ...

Unit Tests/TDD options that can be used for Delphi and FreePascal

I know of the existence of DUnit for Delphi win32. What I'm after is a library that works both on Delphi AND FreePascal. If that is not possible at all, I would really appreciate a list of all the options for one(Delphi) AND the other(FreePascal) ...

Is there a Dependency Injection Framework for Delphi or Free Pascal?

For some of my Delphi / Free Pascal projects I consider using Dependency Injection. Are there already implementations available (or in development) which provide some basic DI (IoC) functionality? Edit: I am not looking for a .NET based solution for Delphi.Net or Prism - in this case, the question would have been: which one should I pic...

Detect enter/exit session under KDE/Gnome with FreePascal

I'm asking this question after I got a very good answer to: How do I detect the 2 states of “Switch User” in Windows My intention is to find out if the Switch User under KDE/Gnome has a similar API call I can monitor with FreePascal. If not with FreePascal, at least the respective lib entry used in C/C++ ...

Find $HOME or Windows equivalent with FreePascal

My purpose is to deploy user configuration files under: $HOME/.appname for Unix/Linux. \Documents and Settings\(user)\Application Data\AppName for Windows. What are the API's or group of functions that I can use, with the appropriate {$IFDEF}'s, so I can deploy my config files on the appropriate places? ...

Time Zone code translation from Windows to Linux in FreePascal

I have this code that works in FreePascal under Windows and need to translate it to Linux but I'm completely lost on the Time Zone Bias value: function DateTimeToInternetTime(const aDateTime: TDateTime): String; {$IFDEF WIN32} var LocalTimeZone: TTimeZoneInformation; {$ENDIF ~WIN32} begin {$IFDEF WIN32} // eg. Sun, 06 Nov 1994 08:49...

Is there a central FreePascal/Lazarus Component repository?

I'm looking to find something like Torry but instead of being Delphi centric, it should be Lazarus centric. I'm aware of the Source Forge Project Code and Component Repository but I'm looking for something with more span and a bit more searching features. ...

free pascal, tdbgrid, get current row

Hi all! I'm new to free pascal and lazarus stuff and i wonder how can i get row data (for example id column) from selected row in tbgrid? ...

How to use TProcess to start ssh

Hi. I need to make a graphic interface in Lazarus from which I run miscelaneous commands on 12 remote computer nodes. Some of these commands never exit/return (for example I also start daemons). This graphic interface needs to separate the user (beginner level) from the overwhelming complexity of Linux. I intend to run miscelaneous too...

Where can I find a good Delphi or Object Pascal implementation for a circular buffer

My main purpose is to have a generic data buffer that I can use for transfers. I'm thinking of something along the lines of what XCopy did. Is there something already made out there or a good example one can follow? ...

pascal string to date

Can someone tell me what's wrong with this piece of code: ShortDateFormat := 'dd/mm/yyyy'; j:=StrToDate('05/05/1999'); I keep getting An unhandled exception occurred at $000000000042FA33 : EConvertError : Invalid date format I'm using fpc. ...