| Reply | « Previous Thread | Next Thread » |
|
hie.. im new in j2me.. i ned help on how to list down the database in recordstore into a menu list.. i hope some1 can help me out here...
|
|
hey,
i exactly did not get ur question but i can help you one way. generally if we think of populating list with records we need to provide the list constructor with some predeifned values u can get it by seeing jsr118 documentation of ur wtk2.2. List(String title, int listType, String[] stringElements, Image[] imageElements) so what u have to do is u have to populate this stringElements array with record store values. in order to do this u need to open the record store of ur choice in a method and make that method return a string array. u can open a record store with recorsstore.openrecordstore("record store name", true/false) now after opening record store read the record store with the help of bytearrayinputstream and datainputstream . for(int i = 1;i<=size;i++) { rs = RecordStore.openRecordStore(playListName,false); ByteArrayInputStream bis = new ByteArrayInputStream(rs.getRecord(i)); DataInputStream dis = new DataInputStream(bis); stringarray = dis.readUTF(); return stringarray; } rs.closeRecordStore(); catch the string array where u call this method; stringaray[] = readmethod; and provide this atring array to list constructor that s it. hope u understand this, with ragards, siva_guduru. |
| siva_guduru |
| View Public Profile |
| Find all posts by siva_guduru |
|
hie siva.. i did as u said..but can u explain more detail on this:
catch the string array where u call this method; stringaray[] = readmethod; and provide this atring array to list constructor that s it. thanks |
|
i solved the problem... thanks
|
| Reply | « Previous Thread | Next Thread » |
| Thread Tools | Search this Thread |
|---|---|
| Thread | Thread Starter | Forum | Replies | Last Post |
|---|---|---|---|---|
| Startup Management list API for unprotected uids | mateen_maldar | Symbian User Interface | 8 | 2006-09-27 10:32 |
| Change the List type of the LIST ??? | divyas | Mobile Java General | 2 | 2006-09-15 21:27 |
| 6680 and bluetooth service profiles | ceruault | Mobile Java Networking & Messaging & Security | 1 | 2005-10-08 23:24 |
| Bluetooth Virtual Serial Port | mealos | Bluetooth Technology | 2 | 2004-12-03 04:46 |
| List item selection | SanDan | Mobile Java General | 2 | 2003-05-06 11:57 |