This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var App = SC.Application.create(); | |
| App.myVar = 'test'; | |
| App.BasicTextView = SC.View.extend({ | |
| textValue: null, | |
| textValueDidChange: function() { | |
| var jQuery = this.$(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 {}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # /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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| MyApp = SC.Application.create({ | |
| modes: { | |
| phone: 350, | |
| tablet: 900, | |
| desktop: Infinity | |
| } | |
| }); | |
| MyApp.MyView = SC.View.extend({ | |