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!
7 Answers
-
You might want to consider using an array to store the strings and then store the array in the properties.
-
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! -
How many strings are you trying to store?
-
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!! -
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.
-
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!
-
How "big" can a single property be? Can it be used to store JSON objects (for caching purposes)?