Cannot call method attachEvent of undefined

Hi,

I am evaluating treetable.
I created sample and getting error:

Uncaught TypeError: Cannot call method ‘attachEvent’ of undefined webix_debug.js:25825
wrap_helper webix_debug.js:25825
(anonymous function)

when treetable is configured.

I created snippet: http://webix.com/snippet/446f0143
Snippet does not show the table, I am missing something, on my machine sample shows table.

Thank you.

I debug webix and see that at line:25839 webix can’t find view…

I also tried to attach event as described in http://docs.webix.com/desktop__angular.html#initingfromconfigobject
“Attaching Events with webix-ready Directive”

I added method to webix-ready but still in the method div could not be found
here is the code
$scope.attachEvents = function(root) {
var tree = root.$$(‘testA’);
tree.attachEvent(“onAfterSelect”, function(id, details) {
alert(details);
});
};

Please help!!!

Problem confirmed, webixEvent doesn’t work when you are using configuration from the controller.
I will post the fix later today.

You can grab the latest build https://s3.amazonaws.com/uploads.hipchat.com/15721/61242/YBe6dbSdkr0LuPJ/webix_1.4.2.zip

With it you can use webixEvent http://webix.com/snippet/6e0e9379
or
use event directly from the configuration ( this one will work better )
http://webix.com/snippet/5ff2ec2d

Hi!

Webix can’t attachEvent via directive using deferred angular bootstrap:

angular.element().ready(function () { angular.resumeBootstrap(); });

And it works like a charm after removing angular.element.ready() wrapper.

If attachEvent doesn’t work - it means the related UI ( object on which you are calling attachEvent ) was not created yet.