Hello everybody, First, I am sorry if I make some mistakes but I am French (nobody is perfect !) I am currently developing an application which is not very far from the notepad example given by Google.
I have a modified Database which have 5 rows instead of 2 or 3 for the Notepad program. So I construct my SimpleCursorAdapter with this : Cursor notesCursor = mTableConso.fetchAllConso(); // Get all of the rows from the database and create the item list startManagingCursor(notesCursor); // Create an array to specify the fields we want to display in the list (only TITLE) String[] from = new String[] {TableConsommation.COLONNE_QUANTITE}; // and an array of the fields we want to bind those fields to (in this case just text1) int[] to = new int[]{R.id.text1}; // Now create a simple cursor adapter and set it to display à la place de null mettre : notesCursor SimpleCursorAdapter conso = new SimpleCursorAdapter(this, R.layout.notes_row, notesCursor, from, to); __________________________________________________________ So you see it's very close to the original code for the moment (I will change everything later). But it crashes ! There is no exception generated so I don't know where the problem comes from. If I replace notesCursor by null, it works, so I guess it's notesCursor who is corrupted... But I don't understand how.. Someone has an idea to solve my problem ? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Beginners" group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~----------~----~----~----~------~----~------~--~---