Uploaded image for project: 'Alloy'
  1. Alloy
  2. ALOY-1570

Alloy: exports.baseController does not work since 1.10.0 (Regression)

    Details

    • Story Points:
      2
    • Sprint:
      2017 Sprint 13 Tooling

      Description

      since 1.10.0 exports.baseController = 'name' does not work.

      I attached simple project with three controllers

      • Base
      • BasedOnBase with exports.baseController = 'base' in js
      • BasedOnBaseXML with <Alloy baseController="Base"> in xml

      With Alloy 1.9.11 I got correct result in both cases:

      function Controller() {
          require("/alloy/controllers/Base").apply(this, Array.prototype.slice.call(arguments));
      ...
      

      but with Alloy 1.10.x I get correct code only for BasedOnBaseXML

      for BasedOnBase I get:

      	require('/alloy/controllers/' + 'BaseController').apply(this, Array.prototype.slice.call(arguments));
      	this.__controllerPath = 'BasedOnBase';
      	this.args = arguments[0] || {};
       
      	if (arguments[0]) {
      		var __parentSymbol = __processArg(arguments[0], '__parentSymbol');
      		var $model = __processArg(arguments[0], '$model');
      		var __itemTemplate = __processArg(arguments[0], '__itemTemplate');
      	}
      	var $ = this;
      	var exports = {};
      	var __defers = {};
       
      	$.__views.BasedOnBase = Ti.UI.createView({ id: "BasedOnBase" });
      	$.__views.BasedOnBase && $.addTopLevelView($.__views.BasedOnBase);
      	exports.destroy = function () {};
       
      	_.extend($, $.__views);
       
      	var args = $.args;
      	exports.baseController = 'Base';
      

        Attachments

          Activity

            People

            • Assignee:
              cwilliams Christopher Williams
              Reporter:
              darknos Sergey Nosenko
              Reviewer:
              Feon Sua Xin Miao
            • Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Backbone Issue Sync

                • Backbone Issue Sync is enabled for your project, but we do not have any synchronization info for this issue.

                  Git Source Code