Created
March 17, 2011 03:56
-
-
Save shiawuen/873813 to your computer and use it in GitHub Desktop.
Problem with using Depot.add, callback never get trigger and the line after the add never get executed. Failed silently…
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var db = new Mojo.Depot( | |
{ name: 'my_wordpress_db', version: 1, estimatedSize: 25000, replace: false }, | |
function() { Mojo.Log.info('Success'); }, | |
function(error) { Mojo.Log.warn('Unable to open database (#' +error+ ')' ); } | |
); | |
// NOT WORKING | |
db.add( | |
'address', 'address', | |
function(){ Mojo.Log.info('Address Added'); }, | |
function(error) { Mojo.Log.warn('Unable to saved. %j', error) } | |
); | |
// NOT WORKING | |
db.add( | |
'address', {value: 'address'}, | |
function(){ Mojo.Log.info('Address Added'); }, | |
function(error) { Mojo.Log.warn('Unable to saved. %j', error) } | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment