Foundation 6

1. Introduction

Foundation is a shell for 4D: a component that supplies everything an application needs around its data, so that you supply only the tables, fields and forms. Install it, add your structure, and the Custom Menus environment has menus, windows, a navigation palette, list and record windows, Find and Sort dialogs, preferences, an About box, logging, passwords and sequence numbers.

History

Dave Batton created Foundation in 1993 and rewrote it as Foundation 4 for 4D 2003; the earliest method headers in this repository carry his name and that date. Walt Nelson and Nelson Consulting, Inc. acquired it in 2008 and produced Foundation 5 for 4D v11, with a group of community developers whose names are in the About box. Wayne Stewart has maintained it since the 64-bit era and was assigned it by deed on 11 September 2026 for release as open source. Foundation 6 is released under the MIT licence. PROVENANCE.md has the chain of title.

Foundation's constants are written by the Constants module of Cannon Smith (Synergy Farm Solutions), which ships inside the component, and Foundation 6 was developed with his DevSync and DevQuickOpen tools. Chapter 11 describes all three and where to find them. Three modules were other people's components before they were Foundation's: the toolbar and button modules are Mark Mitchenall's Toolbar Component, used with permission; the calendar is Tom Dillon's Date Entry component; the dictionary module is Rob Laveaux's. Their headers say so, and the About box names every contributor.

What Foundation is not

It is not a tutorial on 4D. It assumes you can create tables, fields and forms, write a form method, and find your way around the Custom Menus environment. Once running you will want a working knowledge of pointers, which much of Foundation's generic code relies on, and of processes, since every window runs in its own.

It is not a data file. Any data file works; Foundation keeps nothing in it except the tables you choose to give it (Fnd_Log, Fnd_Pref, Fnd_Reg, Fnd_SqNo, Fnd_List, all optional).

It will not be everything to everyone. It is a lot of 4D code, written to be read, pulled apart and overridden through its hooks.

Requirements

4D20 LTS or later: 20 LTS, 20 R, 21 LTS and 21 R each have a build of the component. 4D 19 and earlier are not supported.
PlatformmacOS (notarised DMG) and Windows (ZIP of the same component).
Mode4D single-user, 4D Server with remote clients, and built applications. Compile before you deliver: Foundation behaves differently interpreted, on the assumption that an interpreted host is a developer at work.

Support

Problems and questions go to GitHub Issues. During the beta that is the Foundation Product Sales repository; from 1 December 2026 the Foundation repository itself. Say which 4D version and which Foundation build you are using.

The method reference is generated from the headers in the source and published at https://foundation.open4dshell.com/docs/, with a history of every module and the acknowledgements.