6 messages in com.googlegroups.google-gadgets-apiRe: setPrefs driving me crazy!
FromSent OnAttachments
jodyflorian16 Aug 2007 11:04 
jodyflorian16 Aug 2007 11:58 
jodyflorian16 Aug 2007 12:10 
jodyflorian18 Aug 2007 07:02 
Bonstio20 Aug 2007 03:08 
Dann (Google Employee)20 Aug 2007 11:03 
Subject:Re: setPrefs driving me crazy!
From:Bonstio (bons@gmail.com)
Date:08/20/2007 03:08:47 AM
List:com.googlegroups.google-gadgets-api

I don't think you're being a pain :-) All I can say is that there are an increasingly number of people getting bitten by this bug. It's just an incredibly difficult one to reliably reproduce. I managed to capture evidence of mine using Viewlet Builder software but it's on thing proving that it's happening and another thing getting someone on the server side to see what's going wrong.

Fingers crossed that this problem will get resolved soon.

On Aug 18, 3:03 pm, jodyflorian <jody@gmail.com> wrote:

Hi All,

Sorry, I hope I'm not being a pain (by the lack of responses I'm guessing it's something I've said!!)

Still not having any luck answering this problem but I'm now guesing that it is related to the setprefs bugs.

I'll just have to wait patiently then, unless someone reponds :) I appreciate there are better things people have to do!

All the best

On Aug 16, 8:10 pm, jodyflorian <jody@gmail.com> wrote:

The only significant difference I can spot between the two pages is the querystring.

If calling prefs.set(), does it rely on querysting values to link itself to an account?

On Aug 16, 7:59 pm, jodyflorian <jody@gmail.com> wrote:

I've had a read of the posts
athttp://groups.google.com/group/Google-Gadgets-API/browse_thread/threa... which talked about problems with setprefs.

I've tried calling a single prefs.set() command instead of two, but that didn't work. I also tried the gadget on a homepage with one tab and no other gadgets, still the same problem.

Jody

Hi,

I don't know what's too much / too little info so here it goes anyway.

My gadget is content-type url. When my gadget has collected some information off the user, it needs to put them into the users' module preferences.

The setPrefs lib: it works on one page and not another other, and I can't see why. For the page it doesn't work on, it seems to be able to set and get preferences, however the changes never appear in the module's settings. So I can call prefs.set(x,y) and prefs.getString(x), in both cases the correct value is returned by getString, but in one case it seems to have no bearing on the actual user's preferences.

Also No errors appear in the (FF) javascript console. I'd rather not get into cutting up the pages into pieces and do trial and error - so any ideas very welcome!

All the best, Jody

<a href="" onClick="doPrefs()">go</a> <?php $libraries = split(",", $_GET["libs"]); foreach ($libraries as $script) { if (preg_match('@^[a-z0-9/._-]+$@i', $script) && !preg_match('@([.][.])|([.]/)|(//)@', $script)) { print "<script
src='http://www.google.com/ig/f/$script'></script>"; } } ?> <script> function doPrefs(){ var prefs = new _IG_Prefs(); prefs.set('email','123'); prefs.set('password','456'); alert(prefs.getString('password')); } </script>