On Thu, Feb 28, 2008 at 3:59 AM, Sean McCarthy <[EMAIL PROTECTED]>
wrote:

>
> On 28/02/2008, at 5:51 PM, Kevin Brown wrote:
>
> > On Wed, Feb 27, 2008 at 10:28 PM, Sean McCarthy
> > <[EMAIL PROTECTED]>
> > wrote:
> >
> >> Hi all,
> >>
> >> After a possibly not-so-thorough reading through of the gadget API,
> >> the shindig source and the shindig-dev list archives I can't
> >> determine if there's
> >>
> >> 1. A specification/API for the persistence of UserPrefs to a store
> >
> >
> > Up to the container. Every container has their own way of storing
> > data --
> > you register your own set_pref rpc handler and do whatever you like
> > beyond
> > that. Some sites might store this to a mysql server, others might
> > store it
> > in cookies.
>
> Cool, well that makes things flexible! I thought there might at least
> be an abstraction to the actual store (whatever form that actually
> takes) in the form of a standard API.
>
> So the set_pref rpc handler you're referring to is the one declared
> in gadgets,js?
>
> It looks like a matter of creating a subclass of UserPrefStore (like
> the CookieBasedUserPrefStore example) and then register it with a
> statement like:
>
> gadgets.Container.prototype.userPrefStore = new gadgets.MyPrefStore();
>

Yes, this is exactly how it's designed to accommodate custom
implementations.  Other components follow the same pattern.


> Is this what you meant?
>
> Thanks
> --
> Sean
>

Jun

Reply via email to