Widget setPreferenceForKey(); enhancement
Wednesday, 31. May 2006, 08:08:46
As you may know, when setting and retrieving stored values in widgets using the two functions setPreferenceForKey and preferenceForKey you can only use a string as an argument. I have created a library which acts as a wrapper for these functions, extending their support to:
Download the library
Notes
- String
- Boolean
- Number
- Date
- Array
- Object
Download the library
Notes
- If you try to call a preference which has not been set then the null value will be returned instead of the usual empty string.
- Attempting to save a function will instead save the string "[Function]".
-
4 Jun 2007
Fixed a bug regarding some recursive patterns.
Added a licence.








eestlane # 27. May 2007, 10:17
FataL # 17. November 2007, 05:48
auto-leasing # 31. August 2008, 11:49