Skip to content

Instantly share code, notes, and snippets.

@trabianmatt
Created March 8, 2012 16:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save trabianmatt/2002067 to your computer and use it in GitHub Desktop.
Save trabianmatt/2002067 to your computer and use it in GitHub Desktop.
styles = require('styles').ui
{ Button, Window } = require 'views/ui'
module.exports = class IntroView extends Window
render: =>
@layout (view) =>
view.add @make 'Label', styles.labels.h1,
text: "Launch Kitchen Sink"
view.add @make 'Label', styles.labels.p,
text: '''
The Kitchen Sink project was included in this bootstrapped app as an example
of user interface elements and coding style for titanium-backbone. To remove
the kitchen sink, simply remove the titanium-backbone-ks module from package.json
and remove the reference to 'ks/views/intro' from src/views/main.coffee
'''
button = new Button
text: 'Launch Kitchen Sink'
click: @openKitchenSink
style:
top: 10
view.add button.render().view
@
openKitchenSink: ->
console.log 'Open the kitchen sink.'
KitchenSink = require './main'
kitchenSink = new KitchenSink
kitchenSink.render().open()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment