Skip to content

Instantly share code, notes, and snippets.

@OliverM
OliverM / outletTest.js
Created Jul 5, 2011
Using SC.outlet to connect objects created at runtime to other views/controllers
View outletTest.js
MyApp.TestView = SC.View.extend({
internalTestSet: SC.Set.create(),
testSet: SC.outlet('internalTestSet')
});
MyApp.TestController = SC.ObjectController.extend({
testSetBinding: 'MyApp.TestView.testSet'
});
// at console:
@OliverM
OliverM / core.js
Created Sep 4, 2011
responders in sproutcore
View core.js
// ==========================================================================
// Project: ResponderTest
// ==========================================================================
/*globals ResponderTest */
ResponderTest = SC.Application.create({
NAMESPACE: 'ResponderTest',
VERSION: '0.1.0',
trace: YES
});
@OliverM
OliverM / core.clj
Created Aug 22, 2014
Compojure/Friend route issue
View core.clj
(ns friendtest.core
(:require [ring.adapter.jetty]
[ring.middleware.params :as params]
[ring.util.response :as resp]
[hiccup.page :as h]
[hiccup.element :as e]
[compojure.core :as http]
[compojure.handler]
[compojure.route :as route]
[cemerick.friend :as friend]