This is the mail archive of the
kawa@sourceware.org
mailing list for the Kawa project.
Re: Error with super class android.database.sqlite.SQLiteOpenHelper does not have a default constructor
- From: Per Bothner <per at bothner dot com>
- To: john janecek <johnpauljanecek at gmail dot com>, kawa at sourceware dot org
- Date: Sat, 15 Nov 2014 17:10:31 -0800
- Subject: Re: Error with super class android.database.sqlite.SQLiteOpenHelper does not have a default constructor
- Authentication-results: sourceware.org; auth=none
- References: <CAOu6mLpqKdwAeQm59u81X8LAzy1J8XLhLjZpUZu=Mb7j1eaS+Q at mail dot gmail dot com>
On 11/15/2014 04:52 PM, john janecek wrote:
The class android.database.sqlite.SQLiteOpenHelper does not have a
default constructor. When I attempt to compile this example it fails.
The call to the superclass constructor has to be the very first thing
in the constructor, just as in Java. (This is a JVM requirement.)
So try this:
define-simple-class MyDbHelper (SQLiteOpenHelper)
(posts init: '())
((*init* (context ::Context))
(invoke-special SQLiteOpenHelper
(this) '*init*
context
"prayers.db"
#!null
1)
)
)
--
--Per Bothner
per@bothner.com http://per.bothner.com/