incubator-wookie-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Scott Wilson <>
Subject Re: Wookie Widget Storing Data
Date Tue, 16 Aug 2011 20:27:03 GMT

On 12 Aug 2011, at 13:19, Dean Chaffer wrote:

> Subject; Wookie Widget Storing Data
> Hello I am creating a widget to help people manage a budget and I wanted it
> to store the data so that the user can come back to it and the amount of
> money they have left will  still be displayed. How do I go about creating a
> mechanism to hold the data and give it back to the user Is it too technical
> for a widget can it be done.
> Thanks

Hi Dean,

The easiest method to  use is Widget Preferences.

To set a preference value use:

widget.preferences.setItem("balance", "258.77");

To get it:

var balance = widget.preferences.getItem("balance");

The preferences object can hold any number of tuples, and these are synchronized with the
backend. As well as plain strings, you can also stringify and store JSON structures.

More details on the widget object and its supported attributes and methods here:

Hope this helps,


View raw message