Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 5839373
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T11:34:33+00:00 2026-05-22T11:34:33+00:00

I am using Lawnchair JavaScript library. Reference here http://westcoastlogic.com/lawnchair/ In below code, because i

  • 0

I am using Lawnchair JavaScript library. Reference here
http://westcoastlogic.com/lawnchair/

In below code, because i passed different id, TABLE1 and TABLE2.. I expect dao1 and dao2 are completely be stored as 2 different objects / storage. But the fact is they’re referring to the same thing.. and any “save” action from dao1 or dao2, will be stored at the same “Lawnchair”.

i.e. (dao1.all and dao2.all will return same array).

Appreciate for your big/small idea / suggestion.. Thanks!!

        <script src="javascripts/lib/Lawnchair.js" type="text/javascript"></script>
        <script src="javascripts/lib/adaptors/WebkitSQLiteAdaptor.js" type="text/javascript"></script>
        <script src="javascripts/lib/adaptors/DOMStorageAdaptor.js" type="text/javascript"></script>
        <script src="javascripts/lib/adaptors/LawnchairAdaptorHelpers.js" type="text/javascript"></script>

var dao1 = new Lawnchair('TABLE1');
dao1.nuke(); // Clear persistent storage.
dao1.save({111: '222'});

var dao2 = new Lawnchair('TABLE2');
dao2.nuke(); // Clear persistent storage.
dao2.save({333: '444'});

dao1.all(function(a) {
    console.log("dao1")
    console.log(a)
});
dao2.all(function(a) {
    console.log("dao2")
    console.log(a)
});

will produce something like below in Java Console

dao1
m-account.js:112[
Object
333: "444"
key: "ACF3A299-E986-4993-915F-A62FF009E846"
__proto__: Object
]
m-account.js:116
dao2
m-account.js:117[
Object
333: "444"
key: "ACF3A299-E986-4993-915F-A62FF009E846"

proto: Object

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T11:34:33+00:00Added an answer on May 22, 2026 at 11:34 am

    Lawnchair works fine:

    http://jsfiddle.net/ambiguous/D4u57

    I think you might be checking the wrong things (i.e. array length rather than contents), or putting one object in two Lawnchair databases, or perhaps you’re not including all of the Lawnchair JavaScript files (there are several in my jsfiddle and I had to pull that list out of one of the Lawnchair examples).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

am using http://westcoastlogic.com/lawnchair/ to store data in my application. Lawnchair doesn't work in Blackberry
Using preview 4 of ASP.NET MVC Code like: <%= Html.CheckBox( myCheckBox, Click Here, True,
Using gcc 4.4.3 c89: I am just working on the following code below: I
Using the http://www.ifans.com/forums/showthread.php?t=132024 post from another question i am allowing the user to enter
Using jQuery's UI Tabs. This is my code. <div id=tabs> <ul> <li><a href=#tabs-1>Find a
Using the below XML, I need to figure out which person worked more hours
Using Javascript, is there a standard way to get the absolute path of an
Using PHP I'm attempting to take an HTML string passed from a WYSIWYG editor
I have implement Wikitude SDK and I manage to initialize using this code: -(IBAction)launchAR:(id)sender{
Using VB6 & Crystal Report 9. Need help with the VB6 code. When i

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.