Code Monkey home page Code Monkey logo

Comments (6)

sinnus avatar sinnus commented on September 28, 2024

Fix for bindx.SignalTools.getSignals

    static public function getSignals(bindable:bindx.IBindable, force = true):Map<String, bindx.BindSignal.Signal<Function>> {
        var signals = new Map<String, bindx.BindSignal.Signal<Function>>();
        var clazz:Class<Dynamic> = std.Type.getClass(bindable);
        while (clazz != null) {
            var meta = haxe.rtti.Meta.getFields(clazz);
            if (meta != null) for (m in std.Reflect.fields(meta)) {
                var data = std.Reflect.field(meta, m);
                if (std.Reflect.hasField(data, BIND_SIGNAL_META)) {
                    var args:Array<Dynamic> = std.Reflect.field(data, BIND_SIGNAL_META);
                    var signal:bindx.BindSignal.Signal<Function> = cast std.Reflect.field(bindable, m);
                    if (signal == null && force) {
                        var lazy:Bool = args[1];
                        if (lazy) signal = cast std.Reflect.getProperty(bindable, m.substr(1));
                    }
                    var name = args[0];
                    signals.set(name, signal);
                }
            }
            clazz = std.Type.getSuperClass(clazz);
        }
        return signals;
    }

I think the same should be done for bindx.SignalTools.unbindAll method

from bindx2.

profelis avatar profelis commented on September 28, 2024

@sinnus Can you create Pull Request?

from bindx2.

sinnus avatar sinnus commented on September 28, 2024

@profelis Sure

from bindx2.

sinnus avatar sinnus commented on September 28, 2024

Pull request #14

from bindx2.

profelis avatar profelis commented on September 28, 2024

thanks! haxelib version will be updated later.

from bindx2.

profelis avatar profelis commented on September 28, 2024

@sinnus Updated haxelib version with your fix http://lib.haxe.org/p/bindx2/2.6.3/ . Thanks again

from bindx2.

Related Issues (9)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.