Hi I'm trying to return the result from the phonegap plugin method.
I'like to do the following code.
function table(tableName)
{
var rowCount_i;
return {
tableName : tableName,
rowCount : function(){
window.plugins.getRowCount(
tableName,
function(r)
{
rowcount_i = r;
}
function(e)
{
alert(e);
}
);
return rowCount_i;
}
};
}
When i'm tried to run the following code...
var tbl = new table("psd-person");
alert(tbl.rowCount);
And the result is Undefined..
Is there any way to return the result in rowCount Method or can you show this rowCount method with defferd concept?
Please help me out.. Thanks in advance
}missing at the end