bindable

Data binding for Haxe and MXHX
https://mxhx.dev/

To install, run:

haxelib install bindable 1.0.0 

See using Haxelib in Haxelib documentation for more information.

README.md

Bindable

A data binding library for Haxe and MXHX.

Minimum Requirements

  • Haxe 4.0

Installation

This library is not yet available on Haxelib, so you'll need to install it from Github.

haxelib git bindable https://github.com/mxhx-dev/bindable.git

Project Configuration

After installing the library above, add it to your Haxe .hxml file.

--library bindable

OpenFL or Lime

For Lime and OpenFL, add it to your project.xml file instead.

<haxelib name="bindable" />

Usage

The first argument is the source of the data. The second is the destination. The final argument is a display object where the binding should be activated when it is added to the stage, and deactivated when it is removed.

DataBinding.bind(Std.string(slider.value), label.text, this);

C++

When Haxe creates a release build for the cpp target, it omits certain null checks by default. This configuration can lead to segmentation faults when accessing fields on null objects, instead of an exception that can be caught, like other targets.

There are a couple of different ways to workaround this quirk.

  1. Adding the HXCPP_CHECK_POINTER define to your project's configuration to enable the missing null checks.

  2. If using Haxe 4.3 or newer, using the safe navigation operator to manually handle null objects.

`haxe DataBinding.bind(obj?.prop, dest, this);`

Contributors
bowlerhat
Version
1.0.0
Published
8 weeks ago
Dependencies
License
MIT

All libraries are free

Every month, more than a thousand developers use Haxelib to find, share, and reuse code — and assemble it in powerful new ways. Enjoy Haxe; It is great!

Explore Haxe

Haxe Manual

Haxe Code Cookbook

Haxe API documentation

You can try Haxe in the browser! try.haxe.org

Join us on GitHub!

Haxe is being developed on GitHub. Feel free to contribute or report issues to our projects.

Haxe on GitHub