Join Our 3 MILLION+ Members Today! Register Here | Login
Go Back   BlackBerry Forums at CrackBerry.com > BlackBerry Professionals > App Developers

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
    Thread Author   #1  
Old 03-30-2010, 03:54 AM
CrackBerry Newbie
Device(s): Not a BlackBerry/Smartphone User
 
Join Date: Mar 2010
Posts: 3
Likes Received: 0
Thanked 0 Times in 0 Posts
Default persistent store

Hello i'm new here,

i would like to save a Vector persistent.. is there any way to do that without signing my code? (i don't want to pay anything, because i will just testing on simulator).
Code:
synchronized(store){
			 store.setContents(v_List);
			 store.commit();
		 }
please can somebody help. thanks
Reply With Quote Tip this Post
  #2  
Old 03-30-2010, 08:15 AM
QuiteSimple
Device(s): 9000 (Bold)
Carrier: Verizon
 
Join Date: Sep 2009
Posts: 169
Likes Received: 0
Thanked 1 Time in 1 Post
Default

you don't need to sign your code if you test it on simulator

code signing is only for usage on real device
__________________
www.quite-simple.com
Software that works.
Reply With Quote Tip this Post
    Thread Author   #3  
Old 04-01-2010, 04:07 AM
CrackBerry Newbie
Device(s): Not a BlackBerry/Smartphone User
 
Join Date: Mar 2010
Posts: 3
Likes Received: 0
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by QuiteSimple View Post
you don't need to sign your code if you test it on simulator

code signing is only for usage on real device
thanks for your answer.
I have read such like that, but it does not function!!!

Code:
import net.rim.device.api.system.PersistentObject;
public class Test implements _interface{
	 private Vector list;
	 private Vector info;
	 private PersistentObject store;
	 
	 public Test(){
		if(list==null){
			list = new Vector();
			info = new Vector();
		}
		synchronized(store){
			if(!((Vector) store.getContents()).isEmpty())
				list = (Vector) store.getContents();
		}
	}


	public void insert(Vector info){
                 list.addElement(info);
		 synchronized(store){
			 store.setContents(list);
			 store.commit();
		 }
	 }
  public static void main(String[] args){
       Test test = new Test();
        info.addElement("a");
        test.insert(info);
  }
}
what make i wrong?
by import:
"warning!:member data 'persistentobject store' not required in class:Test"

please any idea!
excuse me for my language.
Reply With Quote Tip this Post
  #4  
Old 04-02-2010, 04:25 AM
QuiteSimple
Device(s): 9000 (Bold)
Carrier: Verizon
 
Join Date: Sep 2009
Posts: 169
Likes Received: 0
Thanked 1 Time in 1 Post
Default

class Test needs to implement net.rim.device.api.util.Persistable

I see that it implements _interface, which I guess implements Persistable... but unfortunately the inheritance won't work I don't know why, I've noticed it by myself few months ago

So define

Code:
public class Test implements Persistable
And I don't see store init, for example

Code:
store = PersistentStore.getPersistentObject(0x8848884884844L);
__________________
www.quite-simple.com
Software that works.

Last edited by QuiteSimple; 04-02-2010 at 04:27 AM.
Reply With Quote Tip this Post
Reply
BlackBerry Forums at CrackBerry.com > > BlackBerry Professionals > App Developers   persistent store

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes