Can you help me solve strange set/getProperties behaviour?

Former Member
Former Member
I cant figure it out, what can't I see?


function onStart()
{
mSettings = getProperty(SETTINGS);
if(null == mSettings)
{
mSettings = new [15];
mSetting[0] = Ui.LoadResource( etc...
}
}
// app code

function onStop()
{
setProperty(SETTINGS, mSettings);
saveProperties();
}


Run 1/ First run and it jumps in to load the resources. I can change the settings. The changes are reflected as they happen.

Run 2/ Next run and it loads without loading the resources. I can see all the changes I made on the first run. I make some new changes and they are reflected as they happen.

Run 3/ Next run and it loads without loading the resources, but I can't see the changes from run 2??????

Why can't I save my settings array when it is loaded with getProperty()?
  • I spent a good amount of time looking into this yesterday afternoon, and tracked down the root of the problem. While I was experimenting, I discovered that if I copy the values from the settings array into a new temp array and save that back to the object store, it would work fine.


    Thanks for your hard work. I think, we would all have been working for a very long time o deduce this...