B4J Question [BANano] CRUD bug using ...Wait

Discussion in 'B4J Questions' started by Mashiane, Jan 25, 2019.

  1. Mashiane

    Mashiane Expert Licensed User

    Hi there

    Attached is a project I am working on to test the BANanoSQL crud functionality using wait. This is meant to enable one to create/read/update/delete records on demand via button clicks. These are the buttons

    • Create Flight - add flight to the db
    • Read Flight - read an existing record from db
    • Update Flight - update an existing record
    • Delete Flight - delete record from db.
    I have a bug with initial calls when each of the buttons are clicked, i'm sure I'm missing something. Create and Read are supposed to run a method to check if there is a record, this is a separate defined method. It does not fire initially.

    To reproduce the bug

    • Generate the project and open the index.html file in browser
    • Open Console Log
    • Click Create Flight about 5 times - this is supposed to check for a record and then if it does not exist add it.
    • Click your browser refresh button
    • Click Create Flight 5 more times
    • Check the records in storage (the same record has been added over and over again)
    • Click Delete Flight

    All the buttons seem to be working only the second time around. Thanks in advance.

    Attached Files:

    Last edited: Jan 25, 2019
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice