I am experiencing a frustrating crash on BB10 cascades.
I have a "Dashboard" page which has a dynamic amount of items in it. The items themselves have contextActions. One of the actions being to remove the item from the dashboard. However when I remove the item(s) the app just force-closes.
An extract of the code is below:
Dashboard.qml
...
Container {
id: ticketContainer
bottomPadding: 20
horizontalAlignment: HorizontalAlignment.Fill
}
...
function refreshTickets() {
ticketContainer.removeAll();
for (var i=0; i<tickets.length; i++) {
var obj = ticketDefinition.createObject();
obj.bookingRef = tickets[i].bookingReference;
obj.bookingDate = ticket[i].bookingDate;
ticketContainer.add(obj);
}
}
Ticket.qml (used for ticketDefinition)
...
contextActions: [
ActionSet {
ActionItem {
id: actionUnTrack
title: "Remove this Ticket"
onTriggered: {
untrackTicket(bookingRef);
}
}
}
]
...
In the ticket.qml it calls a method untrackTicket in a utility class which when done will call the refreshTickets() in Dashboard.qml. As soon as the refresh happens the app closes.
There are no logs for the crash.
Any suggestions on how to tackle this problem?