• Tue 2018.09.18

    Thanks both for the quick and attentive responses.

    I thought I'd found the culprit. I mistakenly used tb.setX = 42; when as @Gordon pointed out should use tb.setX(42);

    Note line #6 that shows the class contents aren't getting updated

    But when I run that tb.setX(42);, I'm faced with yet another error:

    >var tb = new TestBind();
    =TestBind: { "vX": 25 }
    =25
    >tb.setX = 42;
    =42
    >print tb.getX();
    =25
    >var bg = g.bind(tb);
    Uncaught Error: Function "bind" not found!
     at line 1 col 12
    var bg = g.bind(tb);
               ^
    >print bg
    =undefined
    >tb.setX(42);
    Uncaught Error: Expecting a function to call, got Number
     at line 1 col 4
    tb.setX(42);
       ^
    >
    

    This is why I originally used the syntax tb.setX = 42; to avoid the 'Expecting a function to call' error

About

Avatar for Robin @Robin started