I hope its alright to make a new thread but the problem is different.
Alright I have been working on a chess clock of epic proportions and
almost have it up and running. But for the last and coolest part of
its functionality I have hit a wall and would appreciate some help.
The story so far:
The DatabaseHelper class can successfully add rows to the data base
which happens in an activity called add precept. I have pulled the db
file off the device and viewed it with SQLite viewer and all is well.
When I try to load one of the rows and use the data for the main
activities state things begin to go astray.
I have a method in the main activity called setClocks its a wrapper
class that uses the DatabaseHelper method getEntry to fill a MyObject
which has all the data I need to set the apps state. Please help me
figure out why a call of setClocks(1); results in an exception no row
Here is the code:
If I call setClocks(1); in the onCreate of the main activity the app
crashes with the could not find row exception. I know their is a row
with an _id of 1 I can see it on my desktop. I want to load the first
precet when the app loads and then in the onCreateOptionsMenu I have
an option to select a preset. When this is selected it displays a
dialog with a spinner and 2 buttons one for loading the selected
preset and one for removing the selected preset from the database.
Here is my attempt at that. It loads the dialog and the dialog is
populated by the database but when I press load it just goes back to
the main activity with the timers as they where.
And if you need it the setTime method for a ChessClock an inner class
of the main Activity which has its own inner class CountDownTimer
Thank you for reading hope all is well.
What if every thing around you is an elaborate dream?