BlackBerry Forums Support Community
              

Closed Thread
 
LinkBack Thread Tools
Old 03-06-2009, 03:33 PM   #1 (permalink)
New Member
 
Join Date: Aug 2008
Model: Curve
PIN: N/A
Carrier: T-Mobile
Posts: 13
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default Persisting a vector over device resets

Please Login to Remove!

I am new to the J2ME concept of presistable objects. I am trying to persist a vector of strings over device power cycles but am not sure the best way to go about it. I have read that you can implement the persistable interface or use a class that already does this. For instance, BigVector looks like it might meet my needs. However, how do you commit and retrieve the vector to and from the persistant store it looked like it had a normal constructor not a getInstance method. I am really confused, could some one help me out, I am sure this is pretty easy, once you know what you are doing. Again I just want to persist a vector of strings, whats the best way to do this ?
Offline  
Old 03-06-2009, 07:07 PM   #2 (permalink)
BlackBerry Extraordinaire
 
Join Date: Jan 2006
Model: LEZ10
OS: 10.0.10
Carrier: Rogers CA
Posts: 1,704
Post Thanks: 20
Thanked 77 Times in 68 Posts
Default

Have a look at page 79 of Blackberry Application Developer Guide, Volume 2.
Offline  
Old 03-08-2009, 02:54 PM   #3 (permalink)
New Member
 
Join Date: Aug 2008
Model: Curve
PIN: N/A
Carrier: T-Mobile
Posts: 13
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks for the pointer. As a follow on, I am writing a system module so where is a good place to commit ?
Offline  
Old 03-11-2009, 06:52 AM   #4 (permalink)
BlackBerry Extraordinaire
 
Join Date: Jan 2006
Model: LEZ10
OS: 10.0.10
Carrier: Rogers CA
Posts: 1,704
Post Thanks: 20
Thanked 77 Times in 68 Posts
Default

I usually commit when ever any data stored there has changed, and I'm about to return control to the event queue.
Offline  
Closed Thread


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

E-Trac AC Inverter XFC2000-5B .5hp New
$135.0
E-Trac AC Inverter XFC2000-5B .5hp New picture220-PCS MC74LCX04DR2 INVERTER 6-ELEMENT CMOS 14-PIN SOIC T/R 74LCX04DR2
$24.93
220-PCS MC74LCX04DR2 INVERTER 6-ELEMENT CMOS 14-PIN SOIC T/R 74LCX04DR2 picture365-PCS IC SN74HC05D HEX INVERTER WITH OPEN DRAIN 14-SOIC 14-PIN SOIC TI 74HC05
$24.83
365-PCS IC SN74HC05D HEX INVERTER WITH OPEN DRAIN 14-SOIC 14-PIN SOIC TI 74HC05 picture300-PCS IC SN74LVC04ADR HEX INVERTER 14-SOIC 14-PIN SOIC TI 74LVC04 SN74LVC04AD
$22.01
300-PCS IC SN74LVC04ADR HEX INVERTER 14-SOIC 14-PIN SOIC TI 74LVC04 SN74LVC04AD picture34-PCS IC MC74HCT14AD IC INVERTER HEX SCHMITT TRIGGER 14-SOIC SOIC MOT 74HCT14
$11.21
34-PCS IC MC74HCT14AD IC INVERTER HEX SCHMITT TRIGGER 14-SOIC SOIC MOT 74HCT14 picture






Copyright 2004-2016 BlackBerryForums.com.
The names RIM and BlackBerry are registered Trademarks of BlackBerry Inc.