Can GD use JSON on the backend to persist complex objects?
Thanks
Pop
On Mar 28, 1:30 am, Teo <teom...@gmail.com> wrote:
Hi,
usually we use JSON to remember complex objects:http://www.json.org/
Here's more info (including actual .js files that you can include) on how to
use JSON with Javascript:http://www.json.org/js.html
Thanks,
Teo
On Fri, Mar 28, 2008 at 7:18 AM, pop <pop....@gmail.com> wrote:
I am trying to put a composite javascript object into options.
var g_myStuff={
"one":1,
"two":"two"
};
Then when in main.js
function launchOptionsDialog(){
options.putValue("myStuff",g_myStuff);
...
}
and in options.js
function onOpen(){
var myStuff = options.getValue("myStuff");
...
}
Everything was okay but when the Options Dialog is closed (and deploy
this gadget to sidebar), an exception is thrown and says "Data can not
be saved...."
Conclusion:
GD can not persist composite javascript objects via options.putValue()
Is it a feature (lack of object reflection?) or a bug?