Skip to content

Instantly share code, notes, and snippets.

View topherfangio's full-sized avatar

Topher Fangio topherfangio

View GitHub Profile
@topherfangio
topherfangio / data_source.js
Created January 31, 2014 11:10
frameworks/fire_core/record.js
FireCore.attachedRecordTypes = SC.ArrayController.create({
content: []
});
FireCore.DataSource = SC.DataSource.extend({
firebaseApp: null,
firebase: function() {
var app = this.get('firebaseApp');
@topherfangio
topherfangio / 01-08-2014.md
Last active December 18, 2015 17:09
SproutCore Meeting Notes

Actions

  1. Contact geojeff to help out with the todomvc app
  2. Write a 1.10/SC use case and post for CoderWall

Updates

  • #info Update - 'Contact geojeff to help out with the todomvc app' - Guides/holiday done can contact today but want to see if there are more pressing issues.
  • #info Update - 'Write a 1.10/SC use case and post for CoderWall' - Will begin work with a hopeful readyness in 2 weeks.
  • #action topherfangio Contact geojeff to help out with the todomvc app
@topherfangio
topherfangio / design_modes.js
Created May 8, 2013 20:11
Design Modes API Thoughts
MyApp = SC.Application.create({
modes: {
phone: 350,
tablet: 900,
desktop: Infinity
}
});
MyApp.MyView = SC.View.extend({
@topherfangio
topherfangio / README
Created July 30, 2012 20:17
Notes on SlickGrid with Sproutcore
PLEASE NOTE: This is in regards to SlickGrid version 1.4.3; it appears a newer version is available, so your mileage may vary.
Using SlickGrid within Sproutcore requires a few steps:
1) Import the proper files as frameworks
2) Update the Buildfile appropriately
3) Create a basic wrapper class for the functionality you need
1 - So, the basic directory structure I used when importing the frameworks follows. I added two new directories, slickgrid and slickgrid_libs to hold them:
@topherfangio
topherfangio / update_sproutcore_apps.sh
Created March 1, 2012 20:54
Updates SproutCore apps based off of a tar of the static directory.
# /bin/bash
release_path="https://some.great.url/sproutcore/static.tar"
echo "Removing old sproutcore files from git..."
rm -rf static
echo "Downloading static.tar from '$release_path' ..."
wget $release_path
@topherfangio
topherfangio / gist:1929254
Created February 28, 2012 03:43
Intro for SC Guides: Getting Started 2
In Part 1, we walked through the basic pieces of a SproutCore app. In Part 2
we introduce some of the guiding concepts behind a SproutCore application
such as views, controllers, and statecharts.
In Part 2, you'll:
* Learn about statecharts and how they can improve your application.
* Create a new statechart-based SproutCore application.
* Learn about views and how they should handle events.
* Learn how to pass those events to the application's statechart.
@topherfangio
topherfangio / resizable_button.js
Created January 25, 2012 19:39
Simple SC.AutoResize example.
Pharos360.SelectButtonView = SC.SelectButtonView.extend(SC.AutoResize, {
supportsAutoResize: YES,
autoResizeLayer: function() { return this.get('layer') }.property('layer').cacheable(),
autoResizeText: function() { return this.get('longestChoice') }.property('longestChoice').cacheable(),
needsResize: YES,
longestChoice: "",
@topherfangio
topherfangio / base_model.js
Created December 6, 2011 15:15
SC1.6 & Sencha Touch 1.1
CORE360_PROPERTIES_TO_IGNORE = [ 'json_encodable', 'ext_data', 'attributes', 'readOnlyAttributes' ];
Core360.Model = SC.Record.extend({
ext_data: function() {
var hash = SC.clone(this.get('attributes'));
var property_keys = this.get('_properties');
if (SC.none(hash) || SC.none(property_keys)) {
return {};
topher@macbook:~/Documents/Development/Angelic/public/angelic$ bpm add sproutcore -v 2.0.beta.3.1
Fetching packages from remote...
Unfortunately, a fatal error has occurred. Please report this error to the BPM issue tracker at https://github.com/bpm/bpm/issues so that we can fix it. Thanks!
/Users/topher/.rvm/gems/ruby-1.9.2-p180/gems/libgems-0.1.3/lib/libgems/requirement.rb:145:in `block in satisfied_by?': undefined method `call' for nil:NilClass (NoMethodError)
from /Users/topher/.rvm/gems/ruby-1.9.2-p180/gems/libgems-0.1.3/lib/libgems/requirement.rb:145:in `each'
from /Users/topher/.rvm/gems/ruby-1.9.2-p180/gems/libgems-0.1.3/lib/libgems/requirement.rb:145:in `all?'
from /Users/topher/.rvm/gems/ruby-1.9.2-p180/gems/libgems-0.1.3/lib/libgems/requirement.rb:145:in `satisfied_by?'
from /Users/topher/.rvm/gems/ruby-1.9.2-p180/gems/libgems-0.1.3/lib/libgems/source_index.rb:325:in `block in search'
from /Users/topher/.rvm/gems/ruby-1.9.2-p180/gems/libgems-0.1.3/lib/libgems
topher@macbook:~/Documents/Development/Angelic/public/angelic$ bpm list
spade (1.0.2)
sproutcore-metal (2.0.beta.3)
sproutcore-runtime (2.0.beta.3)
jquery (1.6.2)
sproutcore-views (2.0.beta.3)
handlebars (1.0.0.beta.3)
sproutcore-handlebars-format (2.0.beta.3)
sproutcore-handlebars (2.0.beta.3)
sproutcore (2.0.beta.3)