Im fetching data from from Parse and try to show it. Problem im facing right now is find callback is firing multiple times sometimes. How can I stop this? Thanks.
var args = [];
query.find({
success : function(results ) {
args = {
name : results[0].get('name'),
address : results[0].get('address'),
sex : results[0].get('sex'),
email : results[0].get('email'),
age : results[0].get('age')
};
var personView = Alloy.createController("personDetails", args).getView();
if (OS_IOS) {
$.navGroupWin.openWindow(personView);
}
if (OS_ANDROID) {
personView.open();
} // args1 = JSON.parse(JSON.stringify(args));
// Do something with the returned Parse.Object values
},
I experienced the same issue. Here is how I fixed it: