When trying to run a project on a Android-phone, Appcelerator gives an error:
[INFO] : Alloy compiled in 6.57967s
[INFO] : Alloy compiler completed successfully
[INFO] : JavaScript files need to be encrypted
[INFO] : Processing JavaScript files
[ERROR] : Failed to parse /Users/bas/Documents/Appcelerator_Studio_Workspace/Whatever-App-master/Resources/android/alloy/controllers/picture-list.js.js
[ERROR] : Invalid left-hand side in assignment expression (21:4)
The stupid thing is that Appcelerator made the file itself:
[INFO] : [picture-list.js.xml] view processing...
[INFO] : style: "picture-list.js.tss"
[INFO] : view: "picture-list.js.xml"
[INFO] : created: "Resources/android/alloy/controllers/picture-list.js.js"
[INFO] : created: "Resources/android/alloy/styles/picture-list.js.js"
... so why make a file and than later on complain about it?
The app is not running now, stops after compiling.
picture-list.js:
function __processArg(obj, key) {
var arg = null;
if (obj) {
arg = obj[key] || null;
delete obj[key];
}
return arg;
}
function Controller() {
require("/alloy/controllers/BaseController").apply(this, Array.prototype.slice.call(arguments));
this.__controllerPath = "complaints/picture-list";
this.args = arguments[0] || {};
if (arguments[0]) {
__processArg(arguments[0], "__parentSymbol");
__processArg(arguments[0], "$model");
__processArg(arguments[0], "__itemTemplate");
}
var $ = this;
var exports = {};
$.__views.pictures = Ti.UI.createTableViewSection({ // line 21
id: "pictures"
});
$.__views.pictures && $.addTopLevelView($.__views.pictures);
exports.destroy = function() {};
_.extend($, $.__views);
_.extend($, exports);
}
var Alloy = require("/alloy"), Backbone = Alloy.Backbone, _ = Alloy._;
module.exports = Controller;
picture-list.js.js:
function __processArg(obj, key) {
var arg = null;
if (obj) {
arg = obj[key] || null;
delete obj[key];
}
return arg;
}
function Controller() {
require("/alloy/controllers/BaseController").apply(this, Array.prototype.slice.call(arguments));
this.__controllerPath = "picture-list.js";
this.args = arguments[0] || {};
if (arguments[0]) {
__processArg(arguments[0], "__parentSymbol");
__processArg(arguments[0], "$model");
__processArg(arguments[0], "__itemTemplate");
}
var $ = this;
var exports = {};
$.__views.picture - list.js = Ti.UI.createView({ // line 21
id: "picture-list.js"
});
$.__views.picture - list.js && $.addTopLevelView($.__views.picture - list.js);
exports.destroy = function() {};
_.extend($, $.__views);
_.extend($, exports);
}
var Alloy = require("/alloy"), Backbone = Alloy.Backbone, _ = Alloy._;
module.exports = Controller;