Skip to content

Instantly share code, notes, and snippets.

View rklancer's full-sized avatar

Richard Klancer rklancer

View GitHub Profile
// the following is from an ArrayController whose content is a set of Pages; the TreeController's content property is bound to this property:
outline: function () {
var contentLength = this.getPath('content.length') || 0;
return contentLength === 0 ? null : SC.Object.create({
title: 'toplevel',
treeItemIsExpanded: YES,
pages: this.map( function (page) { return page; } ),
treeItemChildren: this.map( function (page) {
@rklancer
rklancer / observer_test.js
Created November 22, 2010 15:46
Simpler test of SC.ObserverSet problem
// Author: Richard Klancer <[email protected]>
/*globals module test ok equals same stop start */
module("SC.ObserverSet.getMethods() removal", {
setup: function () {
SC.LOG_OBSERVERS = YES;
},
teardown: function () {
SC.LOG_OBSERVERS = NO;
@rklancer
rklancer / test_observer.js
Created November 22, 2010 02:23
This fails in the latest master commit
// Author: Richard Klancer <[email protected]>
/*globals module test ok equals same stop start */
module("Problematic SC.ObserverSet.getMethods() removal", {
setup: function () {
SC.LOG_OBSERVERS = YES;
},
teardown: function () {
SC.LOG_OBSERVERS = NO;
// THIS DOESN'T WORK (TableController instances end up sharing the one binding object)
Smartgraphs.TableController = SC.ArrayController.extend({
// ...
dataset: null,
/**
Whether to display the table at all
*/
showTableBinding: SC.Binding.not('*dataset.isStreaming'),
// ==========================================================================
// Project: afterPropertyChange
// Copyright: ©2010 Concord Consortium
// @author: Richard Klancer <[email protected]>
// ==========================================================================
/*globals ok equals stop start pushStop popStart */
/*
afterPropertyChange:
[submodule "sproutcore-examples"]
path = sproutcore-examples
url = git://github.com/rklancer/sproutcore-examples.git
/*globals $ Raphael */
// make these accessible at the Firebug/Web Inspector console
var r, group, points;
$(function () {
var notHighlighted = {
stroke: "#999999",
fill: "#999999"
proxying to garcon:
/geniverse
proxying to geniverse.dev.concord.org:
/geniverse/geniverse/organism
proxying to geniverse.dev.concord.org:
/geniverse/geniverse/organism
proxying to garcon:
/1282914649515/sproutcore/animation.css
proxying to garcon:
/1282914649515/sproutcore/desktop.css
var g = require('./garcon/lib/garçon'),
server, myApp;
// create a server which will listen on port 8000 by default
server = new g.Server();
// adding an application named 'myapp' tells the server to respond to
// the /myapp url and to create a myapp.html file when saving
myApp = server.addApp({
name: 'geniverse',
theme: 'sc-theme',
/* @group Core */
body.sc-doc {
background-color: white ;
padding: 20px;
}
.sc-doc {
font-family: "Lucida Sans", "Lucida Grande", Verdana, Arial, sans-serif;