Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Catalog · How the catalog works
Anything · Lazarus or Delphi
Random projectRandom project

OLTypes

OLTypes Delphi library enhances basic Delphi types with a whole lot of useful methods and the ability to store Null values.

View on GitHub

Member rating

No ratings yet.

Sign in to rate this project.

README

README

What is this repository for?

The repository holds the OLTypes Delphi library. The library enhances basic Delphi types with a whole lot of useful methods and the ability to store Null values. It was tested with Delphi XE and Delphi 12.1. It will not work in Delphi 2005 and below.

The library provides a comprehensive set of features, including:

  • OLTypes (Nullable Primitive Types): The core library provides nullable types like OLString, OLDateTime, OLInteger, etc., which are interchangeable with standard Delphi types (String, TDateTime, Integer), but allow storing Null values. OLInteger is now unified with OLInt64 and supports full 64-bit precision.
  • Primitive Type Helpers: Extensions with many additional methods for basic types like Integer, String (e.g., Join, IsNullOrEmpty), etc. (Available from Delphi 2006+).
  • DataBinding (OLTypesToEdits): Automatic binding of OL types to VCL controls for seamless UI synchronization and data validation (Available from Delphi XE2+).
  • OLArrays and OLDictionaries: Dynamic arrays and dictionaries with helper methods for OL types (Available from Delphi 2009+).
  • OLRegistry: Helper functions for Windows Registry operations (Available from Delphi 2006+).
  • OLThreadRunner: A tool for running tasks in separate threads (Available from Delphi 2009+).
  • OLRegEx: A fluent regex builder that lets you construct regular expression patterns step-by-step using readable method names instead of cryptic symbols.
  • OLMarkdown: A fast and lightweight Markdown builder for Delphi with parsing capabilities and an HTML renderer. Supports standard Markdown syntax, including tables, lists, and code blocks.

Compatibility

Delphi Version OLTypes Primitive Type Helpers DataBinding OLArrays OLDictionaries
2010 ✓ ✕ ✕ ✕ ✕
XE ✓ ✕ ✕ ✓ ✕
XE2 ✓ ✕ ✓ ✓ ✕
XE3+ ✓ ✓ ✓ ✓ ✕
10.4+ ✓ ✓ ✓ ✓ ✓

Licence

OLTypes library is distributed under the MIT License.

How do I get set up?

Using Boss (Recommended)

If you are using Boss (Dependency Manager for Delphi), you can install the library by running inside your project's folder:

bash
boss init # if not previously executed for the project
boss install github.com/mihoo-r/OLTypes

That will download the latest stable version of OLTypes and add its folder to your project's Search Path. Then your project will see OLTypes when you add it to uses.

Manual Installation

  • Download library and unpack it.
  • Add all units from the source folder directly to your project, OR add the path to the source folder to your project's Search path (Project -> Options -> Delphi Compiler -> Search path).
  • Add OLTypes to the uses section in your program

If you wish for the library to be globally available for all new projects, you should add the source folder to your Library path instead. (Menu Tools -> Options -> Environment Options -> Delphi Options -> Library -> Library path).

Feel free to open OLTypesTest.dpr to run the tests and see the new types in action before you start using them yourself.

You may also want to check the Wiki, read the FAQ, browse the DeepWiki, or see more detailed documentation

Contribution guidelines

Please write me when you

  • found a bug,
  • have a suggestion,
  • wrote an interesting modification.

Repo owner and admin: rajewicz+olt@gmail.com