Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-6688] iOS: CommonJS - Module variables not updated

GitHub Issuen/a
TypeBug
PriorityCritical
StatusClosed
ResolutionFixed
Resolution Date2011-12-20T15:08:57.000+0000
Affected Version/sRelease 1.8.0.1
Fix Version/sSprint 2011-50, Release 1.8.0.1, Release 2.0.0
ComponentsiOS
Labelsdr-list, parity
ReporterTrevor Ward
AssigneeBlain Hamon
Created2011-12-15T05:35:36.000+0000
Updated2012-03-04T22:02:19.000+0000

Description

Expected Results

A variable is set in a module, this module is then included in other modules. It is updated by one module for use in the other. The values are updated. Note that Android V8 and Rhino works as expected

Actual Results

The variable is not updated, and thus remains null on iOS

Code

var FSUT	=	{};

FSUT.GV		=	require('FSUT-GV');
FSUT.CO 	=	require('FSUT-CO');

FSUT.CO.showValues();

FSUT.CO.updateValues();

FSUT.CO.showValues();
exports.VARS =
{
	fieldA:			null,
	fieldB:			"123"
};
exports.updateFields = function(inValue, inField)
{
	this.VARS[inField]	=	inValue;
};

var FSUT	=	{};
    FSUT.GV =	require('FSUT-GV');

exports.showValues = function()
{
	alert(FSUT.GV.VARS.fieldA + " .... " + FSUT.GV.VARS.fieldB);
};
exports.updateValues = function()
{
	FSUT.GV.updateFields('NEW VALUE', 'fieldA');
};

Comments

  1. Stephen Tramer 2011-12-15

    This issue should be resolved concurrently with TIMOB-6689 - possibly not the same pull req, but it may be required.
  2. Eric Merriman 2011-12-16

    Verified fixed in simulator (5.0), iPhone 4s (5.0.1), iPod touch 3rd ten (4.0.2) with SDK 1.8.0.1-20111216011148. (appears as 1.8.0.1 due to CI issues being worked on)
  3. Stephen Tramer 2011-12-19

    Reopening issue; must be tagged for merge to 1.9.0. This is still resolved for 1.8.0.1 as indicated by QE.
  4. Michael Pettiford 2012-01-11

    Closing this issue as fixed against 1.8.0.1

JSON Source