Skip to content

Instantly share code, notes, and snippets.

View topherfangio's full-sized avatar

Topher Fangio topherfangio

View GitHub Profile
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)
@topherfangio
topherfangio / app.js
Created August 26, 2011 15:30
Handlebars Text Binding
var App = SC.Application.create();
App.myVar = 'test';
App.BasicTextView = SC.View.extend({
textValue: null,
textValueDidChange: function() {
var jQuery = this.$();
@topherfangio
topherfangio / example.handlebars
Created August 25, 2011 21:11
Quick example of how to use SC.TemplateCollection ItemViews
{{#collection MyApp.ExampleCollectionView contentBinding="MyApp.myController.content"}}
{{view MyApp.MyButton class='mini right'}}
{{/collection}}
<body>
<script src="assets/bpm_libs.js" type="text/javascript"></script>
<script type="text/javascript">
spade.require('Planitly');
</script>
<script type="text/x-handlebars">
<div class='container_16'>
{
"name": "planitly",
"version": "0.0.1",
"bpm": "1.0.0",
"description": "DESCRIPTION HERE",
"author": "YOUR NAME HERE",
"homepage": "URL",
"directories": {
"lib": "./lib",
"tests": "./tests"
@topherfangio
topherfangio / example.js
Created July 19, 2011 07:38
Example of a computed property using @each
MyApp.Project = SC.Record.create({
tasks: SC.Record.toMany(...),
tasksNeedUpdate: 0,
tasksDidUpdate: function() {
this.set('tasksNeedUpate', this.get('tasksNeedUpdate') + 1);
}.observes('*tasks.@each.isComplete'),
allTasksCompleted: function() {
@topherfangio
topherfangio / example.js
Created July 16, 2011 15:12
Eample of SC SelectAll
selectAllClicked: function(evt) {
/*
* Go ahead and deselect all objects first so that we don't confuse the user
*/
Pharos360.studentsController.selectObject();
/*
* Now, select only those students that aren't currently selected
*/
var students = Pharos360.filteredStudentsController.get('arrangedObjects');
@topherfangio
topherfangio / popup_example.js
Created June 17, 2011 16:01
Example of a popup using the popover theme
MyApp.myPopoverView = SC.PickerPane.create({
layout: { width: 300, height: 150 },
themeName: 'popover',
contentView: SC.WorkspaceView.extend({
topToolbar: null,
bottomToolbar: null,
contentView: SC.View.extend({
@topherfangio
topherfangio / main_page.js
Created June 16, 2011 16:07
Basic SC Bindings Example
...
editingPane: MyApp.editingPane.extend({}),
...