Execute "tishadow run" in your Titanium app directory whenever a JavaScript file changes. Edit your JS files in a text editor, save, then switch to the test device or simulator. Profit.
[sudo] npm install -g supervisor
Execute "tishadow run" in your Titanium app directory whenever a JavaScript file changes. Edit your JS files in a text editor, save, then switch to the test device or simulator. Profit.
[sudo] npm install -g supervisor
| function ApplicationWindow() { | |
| var MainView = require('ui/common/MainView') | |
| MenuTableView = require('ui/common/MenuTableView'); | |
| var self = Ti.UI.createWindow(); | |
| var mainView = new MainView(), | |
| menuTable = new MenuTableView(); |
| #!/bin/bash | |
| LOADING=false | |
| usage() | |
| { | |
| cat << EOF | |
| usage: $0 [options] dbname | |
| OPTIONS: |
| This is a simple CommonJS module to wrap Titanium Ti.Network.HttpClient calls to interact with Drupal Services. | |
| NOTE: Code updated at @TiConf using callback functions. | |
| Tested using: | |
| Drupal 6.24 | |
| Services 3.1 | |
| Titanium Mobile SDK 1.8.2 (Android 2.2 SDK) |
| var window = Ti.UI.createWindow({ | |
| backgroundColor:'white' | |
| }); | |
| var scroller = Ti.UI.createScrollView({ | |
| top:60, | |
| contentHeight:'auto' | |
| }); | |
| window.add(scroller); |
| //////////////////////push_notifications.js/////////////////////// | |
| var apns = function(){ | |
| var pref = require('preferences').preferences; | |
| Titanium.Network.registerForPushNotifications({ | |
| types: [ | |
| Titanium.Network.NOTIFICATION_TYPE_BADGE, | |
| Titanium.Network.NOTIFICATION_TYPE_ALERT | |
| ], | |
| success:function(e) |
| //Public client interface | |
| function Client(applicationId, masterKey) { | |
| this.applicationId = applicationId; | |
| this.masterKey = masterKey; | |
| } | |
| exports.Client = Client; | |
| //Parse API endpoint | |
| var ENDPOINT = 'https://api.parse.com/1/classes/'; |
| PROJECT_ROOT=$(shell pwd) | |
| PROJECT_NAME=SampleApp | |
| run: | |
| @echo "Building with Titanium..." | |
| @mkdir -p ${PROJECT_ROOT}/${PROJECT_NAME}/build/iphone/ | |
| @PROJECT_NAME=${PROJECT_NAME} PROJECT_ROOT=${PROJECT_ROOT} DEVICE_TYPE=iphone bash ${PROJECT_ROOT}/bin/titanium.sh |
| // This is the Android version of the Tweetie-like pull to refresh table: | |
| // http://developer.appcelerator.com/blog/2010/05/how-to-create-a-tweetie-like-pull-to-refresh-table.html | |
| var win = Ti.UI.currentWindow; | |
| var alertDialog = Titanium.UI.createAlertDialog({ | |
| title: 'System Message', | |
| buttonNames: ['OK'] | |
| }); | |
| var scrollView = Ti.UI.createScrollView({ |
| /** | |
| * We're going to create an infinite loading table view. Whenever you get close to the bottom, we'll load more rows. | |
| */ | |
| var win = Ti.UI.createWindow({ backgroundColor: '#fff' }); | |
| var isAndroid = Ti.Platform.osname === 'android'; | |
| /** | |
| * Create our UI elements. | |
| */ | |
| var table = Ti.UI.createTableView({ top: 0, right: 0, bottom: 0, left: 0 }); |