This file contains 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
/** | |
* The MyFramework component | |
*/ | |
var MyFramework = {}; | |
/** | |
* The UI component | |
*/ | |
MyFramework.UI = { | |
This file contains 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
{ | |
"types": [{ | |
"name": "HelloWorld", | |
"examples": [], | |
"functions": [{ | |
"name": "say", | |
"parameters": [{ | |
"name": "message", | |
"usage": "optional", | |
"type": "String", |
This file contains 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 HomeLibrary = require('home_library'); | |
// HomeController is the name that will be used inside | |
// the XML view to access the methods of the library | |
var HomeController = new HomeLibrary('home1', $); |
This file contains 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 openMaster() { | |
var win = Ti.UI.createWindow({ | |
title: "Master 2", | |
backgroundColor: 'red' | |
}); | |
$.master_win.openWindow(win); | |
} | |
function openDetail() { | |
var win = Ti.UI.createWindow({ |
This file contains 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
/** | |
* This sample shows the usage of the function convertPointToView. | |
* | |
* In the example, a view is placed in the main window with relative positioning. | |
* When the user clicks on one of the titles in the list, the event listener will | |
* have the click position related to the source object (the row clicked). | |
* | |
* However, the goal is to move the description view (the yellow one) inside the | |
* window, in the position clicked by the user. Using convertPointToView, it is | |
* possible to convert the data received by the event listener to the position |
This file contains 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
// initialize app | |
function start(app, express) { | |
app.use(express.methodOverride()); | |
// ## CORS middleware | |
// see: http://stackoverflow.com/questions/7067966/how-to-allow-cors-in-express-nodejs | |
// | |
// PLEASE NOTE: ANY SERVER CAN UPLOAD HERE! YOU SHOULS ONLY ALLOW SPECIFIC SERVERS BY | |
// EDITING THE ACCESS-CONTROL-ALLOW-ORIGIN HEADER BELOW | |
var allowCrossDomain = function(req, res, next) { |
This file contains 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() { | |
// Create a window | |
var win = Ti.UI.createWindow({ | |
backgroundColor : 'white' | |
}); | |
var sv = Ti.UI.createScrollView({ | |
width: Ti.UI.FILL, | |
height: Ti.UI.FILL, | |
contentHeight: 1000, |