Page 1 of 1

Delphi – Retrieve Corrupted Data from DBF Databases

Delphi – Retrieve Corrupted Data from DBF Databases
0

dBase files, and several “clones” of this format, have been used for decades, and this format is no stranger to developers who use environments like Delphi and Lazarus Pascal.

Sometimes however, we run into the issue that we cannot access our data and in this article, sponsored by Devart, show how you may recover your data with one of their great tools: UniDAC.

On that note: I have used their MyDAC (database access for MySQL) in the past to develop a full fledged LIMS and can only say that Devart delivers one of the best and most reliable database access components you can find.

Keep in mind that these components are commercial products.
However, almost all of them have full-featured Trial versions and free Express versions with limited functionality available for commercial development. I highly recommend them. Also note that quite a few Devart products are suitable for application development for other platforms, for example macOS.

Lazarus Pascal – Move Items to Trash for Windows, Linux and macOS

Lazarus Pascal – Move Items to Trash for Windows, Linux and macOS
6

In this short article I’ll show how I implemented a cross platform (Windows, Linux, macOS) function for Lazarus Pascal to move files or directories to the TrashCan or Recycle Bin.

Since it took me some figuring out, I figured; why not write it down so others may benefit from this as well.
For your convenience: You can also download the Lazarus Pascal unit here, which holds the function for macOS, Linux and macOS.

Lazarus Pascal – Custom Fonts for MacOS Applications

Lazarus Pascal – Custom Fonts for MacOS Applications
4

I’m not sure about other developers, but I occasionally like to use my own custom font for my Lazarus Pascal applications. Typically I do this so I have access to better icons and symbols available in my application, instead of semi blurry bitmap icons. If you use this the right way, your icons and symbols will look much better and will scale really great.

Usually, I use a TTF font for this which I generate at IcoMoon.
IcoMoon is an awesome website where you can compile your own TTF font (or SVG or PNG images of symbols) for use with your website (Tweaking4All uses it as well) or … in your applications.

Since there are plenty examples out there how to do this in Lazarus Pascal for Windows, here an article that shows you how to do this in Lazarus Pascal under macOS.

Lazarus Pascal – Retrieve Yahoo Weather Forecast

Lazarus Pascal – Retrieve Yahoo Weather Forecast
9

I like dabbling with Lazarus Pascal, a free IDE for developing Pascal programs for Windows, MacOS X and Linux, quite similar to Delphi.

One of my projects, would look great with a weather forecast, so I went an figured out how this works by accessing the Yahoo Weather API. This took me a little bit to figure out, but I’ve got it running now, even using https.
This week I decided to put it all in a small unit, so others can use it as well.

This unit only needs Synapse, which is free as well, and uses fcl-json, which comes with Lazarus.

Lazarus Pascal – Unit to Add or Remove Autorun items (Windows/MacOSX)

Lazarus Pascal – Unit to Add or Remove Autorun items (Windows/MacOSX)
0

When developing an application, sometimes it can be useful to offer the user a way to add this application to the LoginItems (Mac) or Autorun items (Windows), so that the application starts when MacOS X or Windows starts.

Since I have developed a couple applications for which this would be helpful, and as of lately even one for both platforms, I figured, why not place this in a unit so the code can be resused easily and quickly. Sharing the code would make life easier for others as well.

So here we are – feel free to post improvements – a unit that Adds, Removes and Checks if an application build with Lazarus Pascal, from the Loginitem/Autorun items.

Lazarus – How to add data to lists with AddObject

Lazarus – How to add data to lists with AddObject
3

Some components in Lazarus Pascal (and Delphi), especially the ones that have a list of strings, allow you to add additional data by linking an object to a string. The function “AddObject” is often used for this, but it’s also the most overlooked option.

With this option you can link (add) any kind of data to rows in your string list, allowing you to add additional (non visual) data.

In this short article, I’ll show you how you can work with these objects, which allow you to extend the data stored with your lists.

How to install Lazarus Pascal on Raspberry Pi 2 (Raspbian)

How to install Lazarus Pascal on Raspberry Pi 2 (Raspbian)
290

For those of you who have visited Tweaking4All more often, you might have noticed that I really like Lazarus Pascal. I use it to develop little freeware applications for multiple platforms (if possible), like for Windows, MacOS X and Linux.

So why not on a Raspberry Pi (Raspbian)? Lazarus allows Rapid Application Development in the good old Delphi style which would be ideal for a platform like the Raspberry Pi. Specially since the Raspberry Pi  2 Model B seems to be fast enough as well.

Now me and my brother-in-law (Jean-Pierre) are planning to build an Alarm system based on a Raspberry Pi 2, use a TouchScreen and plenty of sensor. Lazarus Pascal could be ideal for this purpose.

To my disappointment, it took me a lot of time to get Lazarus to run on my new Raspberry Pi 2 Model B … so that’s why I wrote this article, which is basically a compilation of a lot of steps that I found scattered all over the Internet.

Delphi – IDE Code Editor Keyboard Shortcuts

Delphi – IDE Code Editor Keyboard Shortcuts
0

If you’re like me, and are switching between different developer environments on different platforms, then at times it can be hard to remember the proper keyboard shortcuts. Or … you were never aware of these shortcuts …

In this short article an overview of keyboard shortcuts for Delphi.