RESOURCESOLD

EXAMPLE APPLICATIONS


4D Hierarchical ListsUser Interface
This database demonstrates how to use a hierarchical list in 4D.

New for 4D v13: A new event is now generated when an item deletion is requested. The "effective" deletion is done by programming.

 

Download for Windows or Mac

4D IndexesDatabase
This example database shows the various possibilities for using indexes in 4D.

There are several types of indexes in 4D that can be selected according to the type of data and their use.

 

In addition to demonstrating their effectiveness, this example explains how to choose the most appropriate type of index.

 

Download for Windows or Mac

4D ListboxUser Interface
This example database demonstrates the Listbox object capabilities in 4D.

 

Download for Windows or Mac

4D ObjectsUser Interface
This database demonstrates all of 4D's interface objects.

To access each object, you can either click on the picture buttons on the left side of the form or select it directly from the drop-down menu. 

 

Download for Windows or Mac

4D PicturesData Handling
This example database shows the picture processing that is possible in 4D.

Pictures can be displayed in different ways (truncated, replicated, etc.). They can be transformed (cropped, stretched, etc.).

 

It's also possible to import and export images, as well as to change them from one type to another (from .JPG to .PNG, for example).

 

These possibilities as well as others are demonstrated in this database.

 

Download for Windows or Mac

4D SQLDatabase
This example database demonstrates the possibility of carrying out queries via the 4D language as well as SQL.

Specific examples show both languages in parallel so that they can be compared easily and in order to highlight their respective advantages.

 

Comments and explanations are provided during the execution of these queries.

 

Download for Windows or Mac

4D Static Web Builder v2Internet & Mobility
This application shows how a relational database can be published on the Web either as static or dynamic pages.

It also shows how to transfer, via FTP and using 4D Internet Commands, the static site that is generated.

 

Further indications are given during the demonstration.

 

Download for Windows or Mac

4D IndexesDatabase
This example shows the various possibilities of using indexes in 4D.

4D's index types include:

 

- BTree index for non-repeated values (IDs, names, etc.)
- cluster index for repeated values (Booleans, titles (M., Ms., etc.))
- composite index for sorting (FirstName+LastName, City+ZipCode, State+City, etc.)
- keyword indexes for texts

 

The indexes are created and stored in a separate file.

 

To demonstrate their efficiency, this example explains how to choose the correct index type.
 

Download for Windows or Mac

4D MailingProductivity
This application shows how to use the "4D Write" word processor to send customized e-mails to contacts as a mail shot.


Download for Windows or Mac

 

4D Objects User Interface
This example shows all the interface objects managed by 4D.

These include:

 

• variables

• buttons

• hierarchical lists

• fields

• checkboxes

• etc.

 

To use it, you can click on the buttons representing the Form editor tool bar or you can select a specific type of object directly from a dropdown menu.

 

Download for Windows or Mac

 

4D PicturesSupport for Standards
This application shows off 4D's image processing capabilities.

Images can be displayed in various ways, as well as transformed. They can be imported, exported, and changed from one format to another (i.e. JPG to PNG).

 

Other possibilities are demonstrated as well.

 

Download for Windows or Mac

4D SOAP ClientConnectivity
This SOAP client queries the "4D SOAP Server" application, which must be launched before hand using another 4D application.

Download for Windows or Mac

4D SOAP ServerConnectivity
When launched, this application provides a SOAP service that lets you find out the distance between two cities.

The "4D SOAP Client" example application allows you to test the operation of this service.

 

Download for Windows or Mac

Contact List BoxUser Interface
This application shows you how to use the List Box object with and without programming.

The List Box object replaces grouped arrays on your forms.

 

You can enter data directly into a cell, display alternate colors for rows, resize and sort columns, and much more.

 

Download for Windows or Mac

EncyclopediaProductivity
This application allows you to consult and edit the contents of a glossary or an interactive dictionary.

The words of definition can be clicked individually to access their definitions directly via a link.

 

You can also create new definitions (for any word selected in the texst) by clicking on a button.

 

Download for Windows or Mac

Flash Your ChartsSupport for Standards
This example demonstrates 4D's ability to use external PHP libraries to add functionality to any application.

In this case, we use PHP and Flash to illustrate and animate charts based upon 4D data.

 

Download for Windows or Mac 

 

*As of 4D v12.0, the PHP Execute command will not run if 4D is installed in the "Program Files" directory and  you are not the administrator of the machine. This is fixed for v12.1 (and in 12.0 Hotfix 1 if you are a Partner). As a workaround, you must "Run as administrator." More details can be found in this Tech Tip: http://kb.4d.com/search/assetid=76116

Hierarchical ListsUser Interface
This application demonstrates how to use a hierarchical list in 4D.

The hierarchical list in this example is built dynamically when you click on the 'expandable' elements.

 

Download for Windows or Mac

 

Included ListsUser Interface
This application demonstrates the new possibilities that included lists offer.

In this example, four lists that belong to four different tables are displayed in the same form.

 

The contents of these lists are calculated based on the user's selection.

 

Download for Windows or Mac

Integrated, Native SQLDatabase
4D's database engine and development environment feature integrated, native SQL.

The 4D language allows you to connect directly to an ODBC data source and to execute SQL queries inside  "Begin SQL" and "End SQL" tags (and via the new 4D command: QUERY BY SQL).


This database shows how to carry out queries with the 4D language as well as with SQL.


Specific examples show both languages in parallel in order to compare them easily and to highlight their respective advantages.

 

Comments and explanations are provided during the execution of these queries.

 

Download for Windows or Mac

 

Rich Text AreaUser Interface
This example demonstrates the use of the Rich Text Area component to edit styled text within a 4D database.

Download for Windows or Mac

SVG GoodiesSupport for Standards
The SVG Goodies application offers several methods that take advantage of 4D's integrated SVG image capabilities.

These methods include image rotation, creating reflections, and more, and can be used in your own projects freely.

 

Download for Windows or Mac

Unicode SupportSupport for Standards
This example demonstrates 4D's ability to display Unicode characters.

It also shows the conversion of characters when using the Uppercase and Lowercase functions, as well as 4D's capacity to convert from one standard to another (i.e. ISO-8859-1 to UTF16) via intermediary BLOBs.

 

Download for Windows or Mac

 

4D IndexesArray
This example shows the possibilities of using indexes in 4D v11 SQL.


4D v11 SQL's index types include:

 

- BTree index for non-repeated values (IDs, names, etc.)
- cluster index for repeated values (Booleans, titles (M., Ms., etc.))
- composite index for sorting (FirstName+LastName, City+ZipCode, State+City, etc.)
- keyword indexes for texts

 

This also covers indexes created stored in a separate file.

 

To demonstrate their efficiency, this example explains how to choose the correct index type.
 

Download for Windows or Mac

 

4D MailingArray
This application shows how to use the "4D Write" word processor to send customized e-mails to contacts as a mail shot.


Download for Windows or Mac

 

4D Objects Array
This example shows all the interface objects managed by 4D.


These include:

 

- variables
- buttons
- field lists
- checkboxes
- etc.

 

To use it, you can click on the buttons representing the Form editor tool bar or you can select a specific type of object directly from a dropdown menu.

 

Download for Windows or Mac

 

4D Passwords (User Management)Array
This example shows how to manage users by programming.


It allows you to:

 

- save and restore users and their passwords (encrypted)
- use a customized connection dialog box
- remove or create new users
- create additional information for a user (icon, visibility, etc.)

 

Download for Windows or Mac

 

4D Static Web BuilderArray
This example shows how to publish a relational database on the Web both statically and dynamically.

 

It also shows how to transfer via FTP the generated static web site using the 4D Internet Commands plug-in. Additional information is provided when running the demo.

 

Download for Windows or Mac

 

4D User FormsArray
With 4D, users can modify certain forms.

 

Starting with a classic "clients - invoices - invoices_lines" structure, two forms can be duplicated then modified by the users: "envelopes" and "invoices."

 

These two templates have been deliberately left "open" so the final user can modify the text, formats and paper orientations, as well as margins, objects, etc.

 

Each form can be duplicated as many times as necessary. This allows, for example, specifying several envelope formats as well as different templates for the invoices.

 

Download for Mac or Windows

 

Hierarchical and Included ListsArray
These examples illustrate the use of two types of lists in 4D v11 SQL.


Hierarchical List

This database shows the possibilities of using a hierarchical list:


- display of items of the list of colors
- multiple selections allowed
- events used: "On Expand", "On Collapse" and "On Selection Change"
- dynamically built lists
- icons from resources, object library or variables

 

Included List

This database show the possibilities of included lists:

 

- calculated content updated according to the selections
- 4D v11 SQL customized interface (alignment, font style, etc.)
- graphic object replaces color of current selection
- display of contents of several tables in one form

 

Download for Windows or Mac

 

Integrated, Native SQLArray
One of the major features of 4D v11 SQL is its integrated, native SQL language.


The 4D v11 SQL language allows you to connect directly to an ODBC data source and to execute SQL queries inside  "Begin SQL" and "End SQL" tags (and via the new 4D command: QUERY BY SQL).


This database shows how to carry out queries with the 4D language as well as with SQL.


Specific examples show both languages in parallel in order to compare them easily and to highlight their respective advantages. Comments and explanations are provided during the execution of these queries.


One example illustrates a simple query (which consists of finding the airports of a specific city and country).

 

A second example illustrates a join (which consists of finding from among a selection of airports those that can be accessed via a direct flight).

 

A third illustrates a complex SQL query written simply using the 4D language. 

 

A fourth example shows a complex 4D query illustrating "nested" queries in SQL.

 

Download for Windows or Mac

 

Stock StalkerArray
Stock Stalker is a simple application that tracks your selected stocks.


A Web Area form object displays current graphs of your stocks' performance as retrieved from the internet, with options for update interval, zoom level, date range, and more. (Many thanks to 4D developer Tom Dillon for this contribution.)

 

Download for Windows or Mac

 

SVG Analog ClockArray
This demo uses a simple SVG file of an analog clock, animating the hour, minute and second hands based upon your system clock.


Requires 4D v11 SQL Release 3 or above.

Download for Windows or Mac

 

SVG GoodiesArray
This example demonstrates various uses of 4D SVG, from simple text formatting to advanced functions like creating images with reflections and even animation.


Requires 4D v11 SQL Release 3 or above.

Download for Windows or Mac

 

Theatre Seating Plan (SVG)Array
This is a simple simulation of a graphical seat selector for a theatre, showing seat availability based on a user's click.


Requires 4D v11 SQL Release 3 or above.

Download for Windows or Mac

 

Unicode SupportArray
This example demonstrates 4D's ability to display Unicode characters.


It also shows the conversion of characters when using the Uppercase and Lowercase functions.

 

Download for Windows or Mac

 

Web AreaArray
The new Web Area form object, introduced in 4D v11 SQL Release 2, allows you to display browser-accessible content in your 4D forms.


Web sites, local HTML pages, PDFs, movies, animations, JavaScript controls - all of them are at your diposal.


This demo uses Web Area to create a simple web browser, Google Maps mashup, document viewer, and canvas viewer in 4D v11 SQL.

 

Download for Windows or Mac