Show: Object Pascal C++
Display Preferences

Creating the Application and Defining the Uses Clause

From Appmethod Topics
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.


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


If you choose to build a C++ 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 Object Pascal project, you must include the following units in the Uses clause:

Object Pascal:

Uses
  System.Bindings.Expression,
  System.Bindings.Helper;
For a C++ project, you must include the following headers:

C++:

#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:

Next

See Also

Personal tools
In other languages