You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@shindig.apache.org by Evgeny Bogdanov <ev...@epfl.ch> on 2010/05/05 11:25:11 UTC

"this.userPrefs is undefined" with new shindig-container.js

Hello,

I tried to use the latest version of shindig-container.js file (PHP 
shindig, latest trunk revision)
it does work without user preferences, however when I try to add user 
preferences, I have a problem in
firebug: "this.userPrefs is undefined"

My code is as follows:
         this.gadget_instance = shindig.container.createGadget({specUrl: 
specUrl});
         this.gadget_instance.userPrefs = u_prefs;
           shindig.container.addGadget(this.gadget_instance);
           shindig.container.layoutManager.setGadgetChromeIds(
           ['shindig_gadget']);

           shindig.container.renderGadget(this.gadget_instance);

Where u_prefs is a javascript object built from userPrefs returned by 
shindig's metadata request.

I tried to explore the problem, however the changes I make in 
shindig-container.js are not taken when I append javascript with url:
/gadgets/js/shindig-container:rpc.js?c=1&debug=1&nocache=1
(Is there a special build command I have to run, after I change 
shindig-container.js file?)
Also it seems as debug=1 is not taken into account, the js file is still 
compressed.

Sample html files do not work for me either now:
http://shindig/container/sample1.html <- Failed to load source for: 
http://shindig/container/sample1.html

Hope to get some answers about shindig-container.js changes, so that I 
can proceed with
investigations :)

Best,
Evgeny