Suggestion for app

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
Opaquer
Posts: 247
Joined: Wed Aug 14, 2013 8:24 am

Suggestion for app

Post by Opaquer » Thu Dec 25, 2014 6:29 am

Hey everyone! So, I've been given a project from my workplace. Basically what it will allow users to do is enter information about where they are working each day (they move from place to place throughout the day). So there would be a button that will allow them to enter an address, then log the time and GPS location of the address. I've got the ability to add an address and GPS location, and time should be super simple. My question though is what would be the best way to store the data? I was thinking of putting it into an array, but the only issue I have is that I need a way to search the array and make sure that theres no double entries, which I'm not sure how to do that. My second question is that at the end of each day, the user needs to upload their data somewhere (perhaps through an email) to our system so we can enter it in for the day. Unfortunately, I'm not 100% sure how to do this, or what the best way to do it is. Is there a way to make the app store the data somehow (I need to make this for iPad if that makes a difference), even if the app gets closed, then each day when the users get back to the office, they can press a button to submit the information? As I said, I'm a bit stuck with the storing and submitting information, so if anyone has any ideas that would work, it would be greatly appreciated :D

magice
Posts: 457
Joined: Wed Mar 18, 2009 12:57 am

Re: Suggestion for app

Post by magice » Sat Dec 27, 2014 10:17 pm

my favorite way to save data is as a custom property of a stack. Try this test as an example of how it works:

Code: Select all

on mouseUp
   put "cat,dog,mouse,horse" into tArray --creates a variable with comma delimited values
   split tArray by comma --splitsts the variable into an array 
   set the cData of this stack to tArray --saves the array as a custom property
   put the cData of this stack into tTest --puts the custom property into a new variable
   answer tTest[2] --demonstrates how the process maintained the integrity of the array by answering only "dog"
end mouseUp
of course once a stack has been compiled to an exe, it cannot save itself so just use a different un-compiled stack:

Code: Select all

set the cData of stack "myDataStack" to tArray
save stack "myDataStack"


as far as how to do that over a server, someone else will have to help.

Post Reply