Subject: Can't make Titanium.App.Properties.setList work?

Original Post Bruce Martin's Avatar

Bruce Martin

08 Feb, 2010 10:22 PM via web

I'm am trying to use iPhone local storage. I would like to save an object, as in the following line:
Titanium.App.Properties.setList("FirstItem",{vol;

After I execute that line, I do this test to retrieve the data (with a default return value):
var testproperty = Titanium.App.Properties.getList("FirstItem", {vol;

But the result in testproperty is the null object.
What am I doing wrong?
Is {vol not a list of JSON'able objects?

I haven't done any JavaScript before, having come to Titanium from Windows .NET coding.
Is there any documentation for using this API that includes examples?

  1. 2 Posted by Bruce Martin on 08 Feb, 2010 10:25 PM

    Bruce Martin's Avatar

    I see that my text showing the object that I was passing as a parameter is taken out by the forum editor. How do I include that in my question?

  2. 3 Posted by Robb Shecter on 09 Feb, 2010 02:43 AM

    Robb Shecter's Avatar

    Take a look at the 'Help with syntax' link.

  3. 4 Posted by Bruce Martin on 09 Feb, 2010 01:56 PM

    Bruce Martin's Avatar

    Thanks Robb. I have found my problem by a close scan of Kitchensink, where there is great example code for the properties API. It is queer how just when you post a question, the answer shows up via your own efforts.

Reply to this discussion

Preview Comments are parsed with Markdown. Help with syntax

Attached Files

You can attach files up to 10MB

What is the opposite of bad?