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
var callback = function() { | |
//do something | |
} | |
... | |
var someObject = new SomeObjectConstructor(); | |
someObject.on('click', callback); | |
... |
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
//~/Library/Application Support/Sublime Text 2/Packages/MakeTi/MakeTi.py | |
import sublime, sublime_plugin | |
class MakeTiCommand(sublime_plugin.WindowCommand): | |
instance_list = ["android","android-device","iphone","ipad","web","clean"] | |
def run(self, *args, **kwargs): |
This file has been truncated, but you can view the full file.
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
================================================================================ | |
Appcelerator Titanium Diagnostics Build Log | |
The contents of this file are useful to send to Appcelerator Support if | |
reporting an issue to help us understand your environment, build settings | |
and aid in debugging. Please attach this log to any issue that you report. | |
================================================================================ | |
Starting build at 08/11/12 17:32 | |
Build details: |
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
//basic wrapper | |
function Element(props) { | |
this.setProperties(props); | |
} | |
Element.prototype = { | |
__TiElement: null, | |
__TiConstructor: Ti.UI.createView, | |
__getTiElement: function() { | |
if (!this.__TiElement) { |
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
... | |
label.addEventListener('postlayout', function() { | |
label.height += 100; //causes infinite loop (or not :D ) | |
}); | |
... |
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
var win = Ti.UI.createWindow({ | |
backgroundColor: '#000', | |
layout: 'vertical', | |
navBarHidden: true | |
}); | |
var button = Ti.UI.createButton({ | |
title: 'Add table' | |
}); | |
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
//get ZenTi library | |
var ZenTi = require('/library/zen_ti'); | |
//Window constructor | |
var Window = ZenTi.include('window', 'ui'); | |
//Button constructor | |
var Button = ZenTi.include('button', 'ui'); | |
//List container constructor |
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
var win = Ti.UI.createWindow({ backgroundColor: "#fff", navBarHidden: true, layout: 'horizontal' }); | |
var view = Ti.UI.createView({ | |
layout: 'horizontal' | |
}); | |
var label1 = Ti.UI.createLabel({ | |
top: 150, | |
left: 50, | |
text: 'Testing 1 ...', |
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() { | |
var win = Ti.UI.createWindow({ backgroundColor: "#f00" }); | |
var table = Ti.UI.createTableView(); | |
var rows = []; | |
for (var i = 0; i < 4; ++i) { | |
rows.push({ title: "Row 0", header: "Header " + i, className: "Row1" }); | |
for (var j = 0; j < 10; j++) { |
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() { | |
var win = Ti.UI.createWindow({ backgroundColor: "#f00" }); | |
var table = Ti.UI.createTableView(); | |
var rows = []; | |
for (var i = 0; i < 4; ++i) { | |
rows.push({ title: "Row 0", header: "Header " + i, className: "Row1" }); | |
for (var j = 0; j < 10; j++) { |