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

Science Kit D.C. Milliamperes Meter 320-G Ammeter
$9.55
Science Kit D.C. Milliamperes Meter 320-G Ammeter pictureLaPine Amperes A.C. Meter Z-7143 4416 Ammeter
$13.39
LaPine Amperes A.C. Meter Z-7143 4416 Ammeter pictureCentral Scientific Cenco 0-10 Amps D.C. Amperes Meter DC Ammeter
$10.27
Central Scientific Cenco 0-10 Amps  D.C. Amperes Meter DC Ammeter pictureNOS-NIB Shurite DC Square Panel Meter Ammeter Milli Amps Milliamperes 0-3 MA
$26.21
NOS-NIB Shurite DC Square Panel Meter Ammeter Milli Amps Milliamperes 0-3 MA pictureAntique Hoyt Volt Ammeter DC Penacook NH Pat April 13, 1920 workshop man cave
$99.99
Antique Hoyt Volt Ammeter DC Penacook NH Pat April 13, 1920 workshop man cave picture






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