Created
December 27, 2011 23:52
-
-
Save patakijv/1525509 to your computer and use it in GitHub Desktop.
Global Variables Test
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 MY_BLUE = "#26A9E0"; | |
var module = require("module"); | |
Ti.API.info("[APP] info is "+JSON.stringify(module.info)); |
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 info = { | |
color:"blue", | |
value:MY_BLUE | |
}; | |
exports.info = info; | |
Ti.API.info("[MODULE] info is "+JSON.stringify(info)); |
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
Error dialog indicating that an Uncaught ReferenceError was thrown with a message: MY_BLUE is not defined |
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
[MODULE] info is {"color":"blue","value":"#26A9E0"} | |
[APP] info is {"color":"blue","value":"#26A9E0"} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment