Hi im new working with modules so i started to try a simple module that sends a simple label, this is the code i acctually have below i my principal code
var win= Ti.UI.createWindow({ backgroundColor: 'white' }); var vista = require ('interfaz'); var scre = new vista.login(); win.add(scre); win.open();this is the module code named "interfaz" this is supposed to send a label to the main code
function login () { var show=function(){ var letrero=Ti.UI.createLabel({ color:'#999', text:'Ingrese Password', font:{fontSize:40,fontFamily:'Helvetica Neue'}, textAlign:'center', top: 180, width:'auto' }); return letrero; }; } exports.login=login;I dont know what im missing the fact is that it doesnt works neither shows any label on the emulator, as i said im new at this so i need if anybody can help me to find the solition to this trouble or can give me and advice about this topic i will really aporeciate it
1 Answer
Accepted Answer
seems to be a typo
function login () { // var show=function(){ REMOVED var letrero=Ti.UI.createLabel({ color:'#999', text:'Ingrese Password', font:{fontSize:40,fontFamily:'Helvetica Neue'}, textAlign:'center', top: 180, width:'auto' }); return letrero; // }; REMOVED }
Your Answer
Think you can help? Login to answer this question!