Titanium Community Questions & Answer Archive

We felt that 6+ years of knowledge should not die so this is the Titanium Community Questions & Answer Archive

Titanium.Properties.setString() Limit???????

Hi,
anyone knows if there is a limit in the number of the properties that you can store with Titanium.app.properties.setString()?
Because after 10 records seems it won't work!
Thank you!

— asked May 11th 2010 by Tullio Sebastiani
  • iphone
0 Comments

7 Answers

  • You might want to consider using an array to store the strings and then store the array in the properties.

    — answered May 11th 2010 by Clint Tredway
    permalink
    0 Comments
  • This could be a solution, but of course is more confortable to store as much strings as possible , and moreover there is no difference between a lot of strings or an array with a lot of elements, i'm right?
    Thank you!

    — answered May 11th 2010 by Tullio Sebastiani
    permalink
    0 Comments
  • How many strings are you trying to store?

    — answered May 11th 2010 by Clint Tredway
    permalink
    0 Comments
  • earlier i tried to store 11 strings.When i retrieved the eleventh, getString() returned null.To verify if there was a limit i tried to comment the first two entries and everything worked fine (the 10th and the 11th).At this point i've re-uncommented the first two strings , recompiled the project and magically also the 11th worked well!
    This "unstable" behavior scares me a little bit!!

    — answered May 11th 2010 by Tullio Sebastiani
    permalink
    0 Comments
  • Could you post an example of code where you are storing 11 strings unsuccessfully? If this is indeed a bug, we'd like to know about it.

    — answered May 11th 2010 by Kevin Whinnery
    permalink
    0 Comments
  • Titanium.App.Properties.setString("BUTTON_GREEN","/images/buttons/BUTT_grn_on.png");
    Titanium.App.Properties.setString("BUTTON_GREEN_SELECTED","/images/buttons/BUTT_grn_off.png");
    Titanium.App.Properties.setString("APP_URL","https://localhost/public/index.php");
    Titanium.App.Properties.setString("IMG_URL","https://localhost/public/img/");
    Titanium.App.Properties.setString("TOBECONFIRMED","0");
    Titanium.App.Properties.setString("CONFIRMED","1");
    Titanium.App.Properties.setString("WRONGCONFCODE","2");
    Titanium.App.Properties.setString("UNREGISTERED","3");
    Titanium.App.Properties.setString("BLOCKED","4");
    Titanium.App.Properties.setString("USER_PARTIES","5");
    Titanium.App.Properties.setString("FEAT_PARTIES","6");

    simply like that!

    — answered May 11th 2010 by Tullio Sebastiani
    permalink
    0 Comments
  • How "big" can a single property be? Can it be used to store JSON objects (for caching purposes)?

    — answered March 30th 2011 by James -
    permalink
    1 Comment
    • I also have this question but as a work around I just put the JSON object into a file, one might also use sqlite I guess ;)

      — commented August 30th 2011 by Daniel Urstöger
The ownership of individual contributions to this community generated content is retained by the authors of their contributions.
All trademarks remain the property of the respective owner.