Created
March 3, 2012 01:54
-
-
Save hvgotcodes/1963545 to your computer and use it in GitHub Desktop.
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
function main() { | |
var ui = Sudoku.null, | |
widget = Sudoku.widget; | |
// SC.View initially has no layers, so you'll add your widget to your | |
// view's layers so it can display itself and receive events. | |
ui.get('layers').pushObject(widget); | |
// Next, you'll tell `SC.app` that you want your `SC.View` surface to | |
// become the app's user interface ('ui'). Each app has only one active | |
// `ui` surface, though you can change it at any time. | |
SC.app.set('ui', ui); | |
// You can also add arbitary surfaces to the application using | |
// `SC.app.addSurface(...)`, but this is for a more advanced tutorial. | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment