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');
};
This issue should be resolved concurrently with TIMOB-6689 - possibly not the same pull req, but it may be required.
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)
Reopening issue; must be tagged for merge to 1.9.0. This is still resolved for 1.8.0.1 as indicated by QE.
Closing this issue as fixed against 1.8.0.1