10-11-2011 03:43 PM
After reading the article here
Was trying to do an example so added the command
Database db=Window.openDatabase('documents', '1.0', 'Offline document storage', 5*1024*1024, null);
However in my emulator (Blackberry 9700 simulator), i get the error
ReferenceError: "openDatabase" is not defined.
Running at line 8: db=openDatabase("Customer","1.0","Offline document storage",5*1024*1024,null);}.
Called from line 1: synchronize();} } } }.
Is this only supported on Playbooks ? Wrong SDK version ?
10-11-2011 04:00 PM - edited 10-11-2011 07:25 PM
Sorry found the solution
And to add, there's a way in the emulator to mount the SD card automatically.
Edit the 9700.bat file
and add the item "/sdcard-inserted " to the end of the command line. Specific options avaialble by typing
fledge /help in whatever folder fledge is in. (SD card size, specific directory, etc)
However I have tried different code and haven't got it to work. What am I doing wrong ? Is it a particular emulator I am supposed to use ? Tried 9700 and 8350. Presently using Webworks Plug in version 188.8.131.52010291444-2
and Blackberry webwork SDK plug-in 184.108.40.206010291444-22 and getting the error OpenDatabase is not defined.
10-12-2011 02:44 AM
It seems that your method opendatabase is not being recognized. Most likely it is because you havent included the proper html5.js like this
Are you using visual studio?? In that case I would recommend you to manually install the latest webworks 2.1 as the one you are using in the plugin is older. I actually think that by installing 2.1 you will have the html5_init as an embedded ressource, hence not needing the above. Try it out and let me know about your progress
10-12-2011 10:01 PM