6

I'm trying to use adapters in Lawnchair and running into an issue. I've got a couple of Adapter scripts in my code:

<script src="scripts/Lawnchair.js"></script>
<script src="scripts/dom.js"></script>
<script src="scripts/webkit-sqlite.js"></script>

But when I specify an adapter in my Lawnchair constructor, I get the following error:

Uncaught TypeError: Cannot call method 'valid' of undefined

Here's the code I'm using.

var beers = Lawnchair({name:'beers',adapter:'webkit-sqlite'},function(e){

});

How does one go about setting up adapters in Lawnchair?

ryanstewart
  • 1,004
  • 10
  • 18

1 Answers1

-1

i have the adapter scripts the other way round:

<script src="assets/js/lawnchair/Lawnchair.js" type="text/javascript" charset="utf-8"</script>
<script src="assets/js/lawnchair/adapters/webkit-sqlite.js"></script>
<script src="assets/js/lawnchair/adapters/dom.js"></script>

not that this should make any difference. It also seems that you do not need to specify the adapter. the correct one is chosen for you... i think if you do specifiy it depending on the browser / devise you are using when you get the error you should specify

adapters: ['dom', 'webkit-sqlite']
nodrog
  • 3,532
  • 2
  • 25
  • 31