Advertisement
anta40

Untitled

Jun 12th, 2011
323
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.08 KB | None | 0 0
  1. addMenuItem(new MenuItem("Clear RMS", 0, 2004){
  2.            
  3.             public void run(){
  4.                 long key;
  5.                
  6.                 // Remove profile pic
  7.                 key = 1 + YoyoVariableChat.PIN.hashCode();
  8.                 PersistentStore.destroyPersistentObject(key);
  9.                
  10.                 // Remove smaller profile pic
  11.                 key = 2 + YoyoVariableChat.PIN.hashCode();
  12.                 PersistentStore.destroyPersistentObject(key);
  13.                
  14.                 // Remove self contact
  15.                 key = 1 + YoyoVariableChat.getSelfContact().getUsername().hashCode()*3;
  16.                 PersistentStore.destroyPersistentObject(key);
  17.                
  18.                 // Remove position
  19.                 key = YoyoVariable.POSITION_PERSISTENTKEY;
  20.                 PersistentStore.destroyPersistentObject(key);
  21.                
  22.                 // Remove font
  23.                 key = YoyoVariable.FONT_PERSISTENTKEY;
  24.                 PersistentStore.destroyPersistentObject(key);
  25.                
  26.                 PersistentStorage.erase();
  27.                 PersistentStorage.setRegistered(false);
  28.                
  29.                 Dialog.inform("RMS cleared.");
  30.             }
  31.         });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement