Skip to content

Instantly share code, notes, and snippets.

/**
<div id='range'>
<div id='cell-thing'></div>
</div>
**/
ShaderState = SC.State.design({
initialSubState: 'firstState',
jumpToFirst: function () {
YourApp.someArrayController = SC.ArrayController.create({
someAction: function (x,y) {
var sel = this.getPath('selection');
}
});
// parent view code
something: SC.ListView.extend({
contentBinding: 'YourApp.someArrayController.content',
selectionBinding: SC.Binding.from('YourApp.someArrayController.selection').single(),
@sevifives
sevifives / gist:3717076
Created September 13, 2012 19:45
target action eventing
App.myFunView = SC.View.extend({
triggerABinding: function () {
console.log('huzzah!')
},
createChildViews: function () {
var cvs = [], cv;
cv = this.createChildView(SC.ButtonView,{
and: [
{firstName: 'John', lastName: 'Doe'},
function () { return true }
]
@sevifives
sevifives / gist:6012096
Created July 16, 2013 19:56
dependencies
scripts = {
'_bootstrap': [ 'config', 'creators/inline', 'creators/themedui', 'editable', 'ckeditor', 'plugins', 'scriptloader', 'style', 'tools', /* The following are entries that we want to force loading at the end to avoid dependence recursion */ 'dom/comment', 'dom/elementpath', 'dom/text', 'dom/rangelist', 'skin' ],
'ckeditor': [ 'ckeditor_basic', 'dom', 'dtd', 'dom/document', 'dom/element', 'dom/iterator', 'editor', 'event', 'htmldataprocessor', 'htmlparser', 'htmlparser/element', 'htmlparser/fragment', 'htmlparser/filter', 'htmlparser/basicwriter', 'template', 'tools' ],
'ckeditor_base': [],
'ckeditor_basic': [ 'editor_basic', 'env', 'event' ],
'command': [],
'config': [ 'ckeditor_base' ],
'dom': [],
'dom/comment': [ 'dom/node' ],
'dom/document': [ 'dom/node', 'dom/window' ],
-> % grunt exec
Running "exec:server" (exec) task
>> DEBUG: Running node-supervisor with
>> DEBUG: program 'src/server/main.coffee'
>> DEBUG: --watch '.'
>> DEBUG: --ignore 'undefined'
>> DEBUG: --extensions 'node|js|coffee|litcoffee'
>> DEBUG: --exec 'coffee'