BlackBerryForums.com : Your Number One BlackBerry Community
     

»Sponsored Links


BlackBerryApps.com Best Sellers



Reply
 
LinkBack Thread Tools
  (#1 (permalink)) Old
keatsp Offline
Knows Where the Search Button Is
 
Posts: 21
Join Date: Oct 2009
Model: 8350i
PIN: N/A
Carrier: telus
Default persistent store - 11-02-2009, 06:39 PM

Hello Everyone.

Having a minor issue with persistent store. I have a class called c_settings as you can see below which holds settings within my app. Is there a way to store this in a persistent store without first transfering the values to another type. (ie. boolean array and integer array) I tried just using _settings and everything works without throwing an error but my data doesn't appear to get loaded.

c_settings _settings = new c_settings();
class c_settings
{
boolean _case;
boolean _refresh;
boolean _audio;
int _volume;
int _length;
}
   
Reply With Quote
Sponsored Links
Please Login or Register to Remove these Advertisements!

  (#2 (permalink)) Old
Dougsg38p Offline
CrackBerry Addict
 
Posts: 793
Join Date: Mar 2008
Location: Austin, TX
Model: 8320
PIN: N/A
Carrier: T-Mobile
Default 11-02-2009, 07:43 PM

How about using a hash table? This allows you to set key/value pairs, and it is already persistable.
   
Reply With Quote
  (#3 (permalink)) Old
pgoeol Offline
Knows Where the Search Button Is
 
Posts: 39
Join Date: Sep 2009
Model: 8100
PIN: N/A
Carrier: Airtel
Default 11-03-2009, 05:55 AM

you can store the object of c_settings class as a PersistentObject by implementing Persistable interface...

public class c_settings implements Persistable{

}
   
Reply With Quote
  (#4 (permalink)) Old
keatsp Offline
Knows Where the Search Button Is
 
Posts: 21
Join Date: Oct 2009
Model: 8350i
PIN: N/A
Carrier: telus
Default 11-05-2009, 08:07 PM

Great!!! I'll try that.
   
Reply With Quote
Reply


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On





Copyright © 2004-2009 BlackBerryFAQ.com, BlackBerryForums.com.
The names RIM © and BlackBerry © are registered Trademarks of Research In Motion Limited.