Titanium Community Questions & Answer Archive

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

Saving dashboard data

Hi, I have been working on a app for the iPhone where I use the dashboard view. Here is my problem:

When a user changes the arangement of icons and this gets stored, is there any way to make sure that when a page is not filled that it can be saved that way? Now, because I/it can't detect pagination, it all lands in the first possible place when the saved data is loaded, so any blank space will be filled with icons that were on the next page

I first thought that I could store dashboard.data, but that failed with Titanium.App.Properties.setList because it is an array of objects. I can however do a for-loop on the data, but then any empty spaces and paginations will be skipped.

This is my current solution (where paginations will be ignored):

dashboard.addEventListener('commit',function(e){
    var channels = [];
    for (var i=0;i<dashboard.data.length;i++) { 
        channels.push(dashboard.data[i].label); 
    }
    Titanium.App.Properties.setList('channels',channels);
    win.remove(cancel);
});

Also I have found an issue where it shows the wrong page (look at the dots, also in KS) as the current page when one starts editing.

Any help will be greatly appreciated!

— asked October 26th 2010 by Thomas Bensmann
  • dashboard
  • iphone
  • mobile
  • titanium.app.properties
0 Comments

0 Answers

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.