Hi people! I'm a little bit confuse about prototyping...My code is:
function Upbar(){ var self = Ti.UI.createView({ width:'100%', height:63, backgroundColor:'transparent', layout:'vertical', top:0 }); var menu = Ti.UI.createView({ width:'100%', height:50, backgroundColor:'#323a45', top:0 }); this.line = Ti.UI.createView({ width:'100%', height:13, backgroundColor:'#d44c4c', top:0 }); self.add(menu); self.add(this.line); return self; }; Upbar.prototype.getLineColor = function(){ Ti.API.info(this.line.backgroundColor); }; module.exports = Upbar;This is a module that I call Upbar. When I try to call the function "getLineColor", like this:
var Upbar = require('ui/common/Upbar'); var upbar = new Upbar(); upbar.getLineColor();I got no errors and no prints. Why? Can anyone help me? Thanks a lot!