joli.js icon indicating copy to clipboard operation
joli.js copied to clipboard

'<fieldCount>' is not a function (evaluating 'rows.fieldCount()'...

Open Pita95 opened this issue 10 years ago • 2 comments

"Prior to Release 3.3.0 of the Titanium SDK, note that fieldCount is exposed as a method on iOS, but as a property on Android. Blackberry supported it both as a property and a method. Starting from Release 3.3.0 of the Titanium SDK, fieldCount is supported only as a read only property." (Excerpt from http://docs.appcelerator.com/titanium/3.0/#!/api/Titanium.Database.ResultSet)

Therefore using 3.3.0 of Titanium SDK or higher, when trying to perform a select on iOS you will get the error: '<fieldCount>' is not a function (evaluating 'rows.fieldCount()'...

This is due to line 586 in joli.js fieldCount = rows.fieldCount();

Since this is now a property in iOS, the surrounding logic can be condensed to something like :

var fieldCount = rows.fieldCount;

Hope this helps... Keep up the good work! I love joli.js!

Pita95 avatar Oct 16 '14 18:10 Pita95

Thanks.

trs-mark avatar Nov 14 '14 06:11 trs-mark

+1, faced the same problem and came here to post an issue.

antongorodezkiy avatar Oct 12 '15 22:10 antongorodezkiy