Created
December 22, 2010 16:35
-
-
Save hal-gh/751728 to your computer and use it in GitHub Desktop.
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 window = Titanium.UI.createWindow({ | |
backgroundColor:'red' | |
}); | |
var view = Titanium.UI.createView({ | |
backgroundColor:"blue" | |
}); | |
var x = [ 1,2,3,4,5,6 ]; | |
view.myArray = x; | |
window.add(view); | |
window.open(); | |
function isArray(obj) { | |
if (obj.constructor.toString().indexOf("Array") == -1) | |
return false; | |
else | |
return true; | |
} | |
Ti.API.info("x type isArray = "+isArray(x)); | |
Ti.API.info("view.myArray[3] = "+view.myArray[3]); | |
Ti.API.info("view.myArray type = "+typeof(view.myArray)); | |
Ti.API.info("view.myArray type isArray = "+isArray(view.myArray)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment