Skip to content

Instantly share code, notes, and snippets.

@sevifives
Created September 13, 2012 19:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sevifives/3717076 to your computer and use it in GitHub Desktop.
Save sevifives/3717076 to your computer and use it in GitHub Desktop.
target action eventing
App.myFunView = SC.View.extend({
triggerABinding: function () {
console.log('huzzah!')
},
createChildViews: function () {
var cvs = [], cv;
cv = this.createChildView(SC.ButtonView,{
target: this,
action: 'triggerABinding'
});
cvs.push(cv);
this.set('childViews',cvs);
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment