SkillAgentSearch skills...

Bindable

Experimental library to implement data binding with @:bindable metadata and events

Install / Use

/learn @mxhx-dev/Bindable
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

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.

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

Related Skills

View on GitHub
GitHub Stars4
CategoryDevelopment
Updated18d ago
Forks0

Languages

Haxe

Security Score

75/100

Audited on Mar 20, 2026

No findings