Creating Custom LiveBindings Methods
Go Up to Using Custom Format and Parse Expressions in LiveBindings
If you want to write a custom format or parse expression and you want to do something in that expression that you cannot do using the default LiveBindings methods, you can write your own custom LiveBindings methods.
To create a custom LiveBindings method, you must create a package with a unit where you:
- Register an instance of TMethodDescription using TBindingMethodsFactory.RegisterMethod.
- This instance of TMethodDescription associates a method ID and name with a function that returns an invokable function. This invokable function is responsible for the logic behind your LiveBindings method.
- Unregister the previously-registered method calling TBindingMethodsFactory.UnRegisterMethod with the ID of your LiveBindings method.
When you install a package that includes this unit, your LiveBindings method is registered, and you can use it in your custom format or parse expressions. Your method is also listed in the LiveBindings Methods editor.
- LiveBindings Inc Method (Delphi) code example
- LiveBindings Inc Method (C++) code example