On 16 mar, 08:20, "dean.mikel" <[email protected]> wrote:
> I'm attempting to use html5 db from my gwt application. I'm able to
> open/create a database, and insert data in the table, but I cannot
> read data from table. I can't get the data handler callback to work.
> I am running this in Web mode (because the db won't be available in
> hosted mode). Safari script debugger shows an error stating
> dataHandler and errorHandler can't be found.
>
> I have something similar to this snippet of code:
>
> public void Read( JavaScriptObject db ){
> getData( db );
>
> }
>
> private native void getData( JavaScriptObject db ) /*-{
var dataHandler = function (transaction, results) {
[email protected]::dataHandler(Lcom/google/gwt/core/client/
JavaScriptObject;Lcom/google/gwt/core/client/JavaScriptObject;)
(transaction, results);
}
var errorHandler = function (transaction, results) {
[email protected]::errorHandler(Lcom/google/gwt/core/client/
JavaScriptObject;Lcom/google/gwt/core/client/JavaScriptObject;)
(transaction, results);
}
> db.transaction
> (
> function ( transaction ) {
> transaction.executeSql("SELECT * from people';",
> [], dataHandler, errorHandler );
> }
> );
> }-*/;
Have a look at http://code.google.com/p/gwt-google-apis/ for code
wrapping Gears DB (which has an API similar, if not identical, to
HTML5)
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Google Web Toolkit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---