Creating the Application and Defining the Uses Clause

From RAD Studio
Jump to: navigation, search

Go Up to Tutorial: Using LiveBinding Programatically

Caution: The programmatic method described here is NOT the standard way to implement binding expressions. Typically, you would use the Object Inspector (the standard method) at design time. You might never need to use the programmatic way of creating binding expressions. This tutorial demonstrates, however, that it is possible to manually create such expressions.
For examples of using LiveBindings in the standard way, see:

To better exemplify how to use LiveBinding programmatically, create a new project by choosing:

If you choose to build a C++Builder console application, then, from the New Console Application (C++) wizard, choose Source Type as C++, Target Framework as none, deselect Multi Threaded, and make sure Console Application is selected.

For a Delphi project, you must include the following units in the Uses clause:


For a C++Builder project, you must include the following headers:


#include <System.Bindings.Expression.hpp>
#include <System.Bindings.Helper.hpp>
You also have to instruct the C++ compiler to generate RTTI information used by the LiveBindings engine. To do this, add the following line at the beginning of your project.
#pragma explicit_rtti methods()

For more information on these units, please consult the appropriate API reference topics:


See Also