Created
February 7, 2012 17:56
-
-
Save meeech/1760995 to your computer and use it in GitHub Desktop.
[ERROR] Adding an event listener to a proxy that isn't already in the context
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 sets the background color of the master UIView (when there are no windows/tab groups on it) | |
Titanium.UI.setBackgroundColor('#ccc'); | |
var win = Ti.UI.createWindow({ | |
modal: false | |
}); | |
var cView = Ti.UI.createScrollView({ | |
layout:'horizontal', | |
height: 35, | |
contentHeight: 35, | |
contentWidth: Ti.Platform.displayCaps.platformWidth, | |
left: 0, | |
right: 0, | |
top: 0, | |
backgroundColor: '#c0c' | |
}); | |
for (var i=0; i < 1; i++) { | |
var tLabel = Ti.UI.createLabel({ | |
touchEnabled: false, | |
text:'foo '+i, | |
backgroundColor: '#cde', | |
borderColor: '#abc', | |
borderWidth: 1, | |
borderRadius: 5, | |
left:5, | |
top: 1, | |
width:'auto', | |
height:25, | |
font: { | |
fontSize: 13 | |
}, | |
textAlign: 'center' | |
}); | |
//Once label created, we can + to the auto width to pad things properly. | |
tLabel.width = tLabel.width+10; | |
cView.add(tLabel); | |
}; | |
var ta = Ti.UI.createTextArea({ | |
width: Ti.Platform.displayCaps.platformWidth, | |
height: 200, | |
top: 0, | |
left: 0, | |
font: { | |
fontSize: 18, | |
fontWeight: 'bold' | |
}, | |
zIndex: 1, | |
keyboardToolbar: [cView] | |
// appearance : Titanium.UI.KEYBOARD_APPEARANCE_ALERT | |
}); | |
win.add(ta); | |
// win.add(overlay); | |
win.open(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment