Hello,
It seesm that there is a change in reading back settings from an application, the script does not read back the parameters it used to in 1.7.
Here is a test script, run on 1.7 and 1.8:
"use strict";
#include <pjsr/DataType.jsh>
console.writeln( #__DATE__ ); // Date of execution start
console.writeln( #__TIME__ ); // Local time of execution start
console.writeln( #__JS_VERSION__ ); // 100 * version of the JavaScript engine (185 in PI 1.7; 187 in PI 1.8)
console.writeln( #__PI_VERSION__ ); // Full PI Core version. Example: 01.08.00.0853
console.writeln( #__PI_MAJOR__ ); // PI Core version: major version number
console.writeln( #__PI_MINOR__ ); // PI Core version: minor version number
console.writeln( #__PI_RELEASE__ ); // PI Core version: release version number
console.writeln( #__PI_BUILD__ ); // PI Core version: build number
#ifdef __PI_BETA__
console.writeln( "Beta ", #__PI_BETA__ ); // PI Core version: beta version number, or undefined
#endif
#ifdef __PI_LE__
console.writeln( "Limited Edition" ); // Defined if this is a LE version
#endif
console.writeln( #__PI_LANG__ ); // PI Core version: language code, ISO 639.2
//console.writeln( #__PI_CODENAME__ ); // PI Core version: Codename (1.7: Starbuck, 1.8: Ripley)
console.writeln( #__PI_PLATFORM__ ); // One of: LINUX, FREEBSD, MACOSX, MSWINDOWS
#ifgteq __PI_MINOR__ 8
console.writeln( #__PI_ARCH__ ); // *** New in 1.8: One of: x86, x86_64
#endif
var value = Settings.read( "BitliTest/toto", DataType_Double );
console.writeln( "toto is "+ value + ", ok: " + Settings.lastReadOK);
Settings.write("BitliTest/toto", DataType_Double, 1.0 );
Run twice on a 1.7 with fresh 'ini' (the first time the parameter is not present, second time it is present, which is correct)
2012/12/28
17:55:40
185
01.07.06.0793
1
7
6
793
eng
MSWINDOWS
toto is null, ok: false
2012/12/28
17:55:49
185
01.07.06.0793
1
7
6
793
eng
MSWINDOWS
toto is 1, ok: true
Run on version 1.8, on a fresh ini. It does not read back the settings on the second execution:
2012/12/28
17:57:10
185
01.08.00.0932
1
8
0
932
eng
MSWINDOWS
x86_64
toto is null, ok: false
2012/12/28
17:57:19
185
01.08.00.0932
1
8
0
932
eng
MSWINDOWS
x86_64
toto is null, ok: false
They appear in the ini file of both 1.7 and 1.8 as
ScriptData\BitliTest\toto=1
Is this a bug or something I missed ?
-- bitli