I have a ObjectController with that creates a TREE like structure based on a model (list of EmberData objects) - with a property that observers the model “length” - when the length changes.
When objects get added I need to recreate the tree - but I can not call treeContent
The Ember.run.once function does not call treeContent and can not see it …“this” is not the controller !!
var ScenGrpsController = Ember.ObjectController.extend({ modelDidChange: function(e) { var _self=this; Ember.run.once(_self, “treeContent”); }.observes(‘model.length’),
treeContent: function() {}
I know “this” is a pain but how can I get a ref to the controller I am in ?