Skip to content

Instantly share code, notes, and snippets.

YourApp.yourController.create({
myNewAction: function (view,somethingThatIcannotRemember) {
console.log('woo');
}
});
SC.ButtonView.design({
target: YourApp.yourController,
action: 'myNewAction'
})
var fr = YourApp.getPath('bodyPage.mainPane.firstResponder');
if (fr && fr.commitEditing) { fr.commitEditing(); }
var person = SC.Object.create({
firstName: 'John',
lastName: 'Smith',
fullName: function () {
var first = this.get('firstName');
var last = this.get('lastName');
return '%@ %@'.fmt(first,last);
}.property('firstName','lastName').cacheable()
});
person.get('firstName'); // 'John'
// ==========================================================================
// Project: FamilyTies.Family
// Copyright: ©2010 My Company, Inc.
// ==========================================================================
/*globals FamilyTies */
/** @class
(Document your Model here)
YourCustomView = SC.View.extend({
yourArrayOfContent: [],
contentKey: 'foo',
createChildViews: function () {
var key = this.get('contentKey');
var kids = this.get('yourArrayOfContent');
var self = this;
var childViews = [];
someSceneViewThing: SC.View.extend({
childViews: 'tab'.w(),
tab: SC.TabView.extend({
layout: { left: 10, top: 10, right: 10, bottom: 10 },
nowShowingBinding: 'yourApp.path.nowShowing',
items: [ { title: "_Title".loc(), value: 'yourApp.path'},
{ title: "_Title".loc(), value: 'yourApp.path'},
{ title: "_Title".loc(), value: 'yourApp.path'} ],
itemTitleKey: 'title',
itemValueKey: 'value',