Skip to content

Instantly share code, notes, and snippets.

View erichocean's full-sized avatar

Erich Ocean erichocean

  • Xy Group Ltd
  • North Carolina
View GitHub Profile
// ========================================================================
// SproutCore
// copyright 2006-2008 Sprout Systems, Inc.
// ========================================================================
require('core') ;
/**
@class
recomputeClippingFrame: function() {
this.recacheFrames();
var parent = this.parentNode;
while (parent) {
parent.recacheFrames();
parent = parent.parentNode;
}
},
Cp2.mixin(
/** @scope Cp2 */ {
/** Landing page */
goStateA1: function() {
// do something...
},
/** Some other page */
goStateA2: function() {
/** @namespace */
Cp2 = SC.Object.create( SC.Statechart,
/** @scope Cp2 */ {
// This will create the server for your application. Add any namespaces
// your model objects are defined in to the prefix array.
//server: SC.Server.create({ prefix: ['Cp2'] }),
server: SC.RestServer.create({ prefix: ['Cp2'], postFormat: SC.JSON_FORMAT, escapeJSON: false}),
// This is the Current User of the System. This is where we get all the authentication tokens that get passed
require('core') ;
/**
@mixin
This where we will put all of the State core to keep it centralized.
@extends Cp2
@author Evin Grano
@version 0.1
// THIS:
successfulLoad:function(){
console.log("Core#successfulLoad called...");
var handled = NO;
switch(this.state.a){
case 2:
if(SC.Store.findRecords({recordType: Cp2.LandingPage}).length > 0){
this.goState('a','5');
}
else if(SC.Store.findRecords({recordType: Cp2.LandingPage}).length){
//
// indentation should be two spaces, not tabs
//
// THIS (soft-tabs, two spaces):
var p = 12;
// NOT THIS (hard tabs):
var p = 12; // wrong: uses a tab, not two spaces
troy:private-abbot onitunes$ rake spec
(in /Users/onitunes/git/sproutit/private-abbot)
WARNING: Possible conflict with Rake extension: String#ext already exists
WARNING: Possible conflict with Rake extension: String#pathmap already exists
WARNING: Not testing markdown() because BlueCloth is not installed
...............................................................................................................................................................................F.....F......................FF..................................................................................FFFFFFF.................FF..............F.......FFF.FFFFFFFFFF...........F.......FF..................
1)
NoMethodError in 'SproutCore::Builder::Html API for templates StaticHelper exposes stylesheets_for_client() does NOT add stylesheet for test if CONFIG.load_test'
undefined method `manifest_for' for nil:NilClass
troy:private-abbot onitunes$ rake spec
(in /Users/onitunes/git/sproutit/private-abbot)
WARNING: Possible conflict with Rake extension: String#ext already exists
WARNING: Possible conflict with Rake extension: String#pathmap already exists
WARNING: Not testing markdown() because BlueCloth is not installed
...............................................................................................................................................................................F.....F......................FF..................................................................................FFFFFFF.................FF..............F.......FFF.FFFFFFFFFF...........F.......FF..................
1)
NoMethodError in 'SproutCore::Builder::Html API for templates StaticHelper exposes stylesheets_for_client() does NOT add stylesheet for test if CONFIG.load_test'
undefined method `manifest_for' for nil:NilClass
render: function(renderContext) {
renderContext.push('<div>');
this.renderChildren(renderContext);
renderContext.push('</div>');
}