Skip to content

Instantly share code, notes, and snippets.

@hvgotcodes
Created March 3, 2012 01:54
Show Gist options
  • Save hvgotcodes/1963545 to your computer and use it in GitHub Desktop.
Save hvgotcodes/1963545 to your computer and use it in GitHub Desktop.
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