diff --git a/README.md b/README.md index d681b55..185612b 100644 --- a/README.md +++ b/README.md @@ -60,6 +60,7 @@ Bind.bind(expr, listener) | executes `listener` if property or method in `expr` Bind.bindTo(expr, toExpr) | Assign result of `expr` to `toExpr` (NB: if `expr` contains method, then this method will be executed without arguments!). Does NOT invoke `expr` automatically. Bind.notify(expr, oldValue, newValue) | Manually execute notification about property or method changes (if `expr` is method, then `oldValue` and `newValue` are not required) Bind.unbind(expr, listener) | Unsubscribe provided `listener` from `expr` changes (NB: if `listener` is not specified, all listeners for binded to this `expr` will be unsubscribed) +Bind.bindAll(obj:IBindable, listener, force) | Bind all properties and methods of `obj` (force mode instantiate all lazy signals). Return unbind callback Bind.unbindAll(obj:IBindable) | Unbind all properties and methods of `obj` (NB: still can bind new listeners after that!) ## Extended API: diff --git a/README_ru.md b/README_ru.md index 85f8648..92d9635 100644 --- a/README_ru.md +++ b/README_ru.md @@ -60,6 +60,7 @@ Bind.bind(expr, listener) | `listener` вызывается при смене с Bind.bindTo(expr, toExpr) | Присваивает значение `expr` выражению `toExpr` (NB: в случае метода вызывает метод без параметров!). Автоматически первый вызов НЕ происходит Bind.notify(expr, oldValue, newValue) | Ручной вызов оповещения об изменении свойства или метода (в случае метода ожидается только один аргумент в методе `notiry`) Bind.unbind(expr, listener) | Удаляется подписка на изменения свойства (NB: если `listener` не указать, произойдет полная отписка всех слушателей!) +Bind.bindAll(obj:IBindable, listener, force) | Подписывается на изменения всех свойств и методов `obj` (force режим создаст все лениво создаваемые сигналы). Вернет колбек для отписки Bind.unbindAll(obj:IBindable) | Удаляются все подписки на изменения всех свойств и методов объекта (NB: дальнейшая подписка доступна!) ## Расширенное API: diff --git a/haxelib.json b/haxelib.json index 5e909b9..55b1282 100644 --- a/haxelib.json +++ b/haxelib.json @@ -5,8 +5,8 @@ "tags": ["bind", "binding", "bindings", "cross"], "description": "Powerful and fast macro-based data binding engine inspired by Flex Bindings with easy-to-use syntax.", "classPath": "src", - "version": "2.3.0", - "releasenote": "typedefs support", + "version": "2.4.0", + "releasenote": "bindAll method", "contributors": [ "deep" ] diff --git a/src/bindx/BindSignal.hx b/src/bindx/BindSignal.hx index 7adfbbd..97c20e7 100644 --- a/src/bindx/BindSignal.hx +++ b/src/bindx/BindSignal.hx @@ -118,12 +118,10 @@ class SignalTools { var data = std.Reflect.field(meta, m); if (std.Reflect.hasField(data, BIND_SIGNAL_META)) { var signal:bindx.BindSignal.Signal = cast std.Reflect.field(bindable, m); - trace(signal); if (signal == null && force) { var args:Array = std.Reflect.field(data, BIND_SIGNAL_META); var lazy:Bool = args[0]; if (lazy) signal = cast std.Reflect.getProperty(bindable, m.substr(1)); - trace(signal); } if (signal != null) signals.push(signal); } diff --git a/submit.sh b/submit.sh old mode 100755 new mode 100644 index 742b765..c72f6e5 --- a/submit.sh +++ b/submit.sh @@ -1,4 +1,4 @@ #!/bin/bash -zip -r haxelib.zip src haxelib.json +zip -r haxelib.zip src haxelib.json README.md haxelib submit haxelib.zip \ No newline at end of file