Comment 27 for bug 1124071

Revision history for this message
Zsombor Egri (zsombi) wrote : Re: [tabs] Cannot add Tabs programmatically

We have added functions to add, insert, move and remove tabs. However there were some issues with the way tabs were arranged in the Tabs stack, therefore we had to remove the MP which fixed this bug, so teh functions disappear again.

On the other side we managed to fix the Repeater issues we had earlier with the Tabs, so you could use the Repeater to maintain dynamic tabs now. We haven't decided still whether we should only recommend Repeater to maintain dynamic tabs or have the functions back. They both have their pros and cons, like with functions you can decide what kind of Tab you want to add, whereas with Repeater you need to have some hint in the model which tells what tab you shoudl use, and then you need to use a loader for that. On the other side, one thing is sure: you cannot combine Repeater and function-based added tabs, as you cannot insert a Tab in between the tabs created by the Repeater, because any model change of the Repeater will throw out the function-added tab from that area.

So, for RSS app, I think a Repeater would do the job, where the model would be a list of URLs with feeds. Or you know better how your code is organized. I can help you on building that side of your app if need.

Something like:
Tabs {
    Repeater {
        model: ["Page 1", "Page 2"]
        Tab {
            title: modelData
            page: Page {
                [....]
            }
        }
    }
}