Skip to content

Instantly share code, notes, and snippets.

// I just found out that .bind automatically sets up chained bindings in SproutCore. When did that get added?
var data = SC.Object.create({ insideObject: SC.Object.create({ property: "Value" }) });
var view = SC.Object.create();
view.bind('prop', data, 'insideObject.property');
// expected:
SC.RunLoop.end();
console.log(view.get('prop')); // -> "Value"

Proposed View-layer changes

Friday, Juan, Tom, Yehuda and I had a meeting where we discussed the renderer APIs and some ideas we had for the view layer. Here is what we came up with:

Overview

The purpose of these proposed changes is to lower the learning curve for users entering the SproutCore world and who are looking for quick feedback and an easy way to create custom views

Chance 2.0

Chance 2.0 is an evolution of Chance. In addition to CSS syntax extensions and automatic image spriting+data urls, Chance 2.0 also covers some changes to SC build tools and bootstrap, and includes a recommendation on how themes should be structured.

Themes Naming

Currently (1.5), there are multiple parts of a theme name:

SC Rendering Architecture

This is a bit wordy, because it actually goes into detail on how the implementation would work, down to how it would approach reordering child views in DOM and the drawbacks of that method.

The summary and examples cover the effects at a higher level.

Goals

@ialexi
ialexi / dirs.md
Created September 21, 2010 16:04

Build Tools Directory Structure Issues

When modular (not necessarily CommonJS) loading exists, directory structure becomes more complicated.

Unless every module is explicitly required, we will have somewhat inconsistent load order.

We can determine when to load files by using getters; if getters are not available, we must load all files at startup. But if we load all files at startup, then load order is important, so we must watch for sc_require.

Further, we may have code that will need to run outside of modules; otherwise, it will be hard, for instance, to know when foundation should extend some of the components originally made in SC runtime.

Hedwig.GUIDE_CONTENT = {
"title": "Touch Application Guide",
"sections": [{
"title": "Introduction",
"articles": [{
"content": "<h1>A Brief Touch</h1>nn<p>It is very possible to build <em>awesome</em> touch-enabled applications in SproutCore.</p>nn<p>But, what makes an awesome touch-enabled application? Sure, it must accept touches,nbut with SproutCore's (constantly growing) touch support, this is now pretty easy:nmany existing interfaces, if built with newer SproutCore varieties, will function fine (or mostly fine),non both larger-screened touch devices (such as iPad) and the traditional desktop environment.</p>nn<p>But there are many differences between desktop and touch platforms:</p>nn<ul>n<li><strong>Precision.</strong> Touches are less precise than clicks. To compensate, controls should be larger.</li>n<li><strong>Performance.</strong> Touch-based devices tend to be slow (for now). To get around this just takes nsome elbow grease: there are many techniques to speed th
config :all,
:combine_javascript =>false,
:combine_stylesheets =>true,
:minify_javascript =>false,
:minify_css =>false,
:required => [:sproutcore, 'flot']
proxy '/blah.php', :to => 'subdomain.domain.com', :url => '/path/to/phpfile'
# ===========================================================================
# Project: RaphaelPlay
# Copyright: ©2010 My Company, Inc.
# ===========================================================================
config :raphaelplay, :required => [:sproutcore, :raphael]
config :test_controls, :required => [:sproutcore, "sproutcore/forms", "sproutcore/animation"], :theme => "sproutcore/ace"
config :phone_controls, :required => [:sproutcore, "sproutcore/forms", "sproutcore/animation"], :theme => "sproutcore/ace"
MyApp.graphController = SC.ArrayController.create(
/** @scope MyApp.graphController.prototype */ {
content: [
SC.Object.create({label: 'set1', data:[[0,0]]}) ,
SC.Object.create({label: 'set2', data:[[0,0]]})
] ,
options: SC.Object.create({}) ,
checkArrangedObjects: function(){
MyApp.graphController = SC.ArrayController.create(
/** @scope MyApp.graphController.prototype */ {
content: [
SC.Object.create({label: 'set1', data:[[0,0]]}) ,
SC.Object.create({label: 'set2', data:[[0,0]]})
] ,
options: SC.Object.create({}) ,