Wednesday, 15 April 2015

methods - iOS ObjC - incompatible result type in different translation units -



methods - iOS ObjC - incompatible result type in different translation units -

i trying simple test, counting items in nsarray. looks simple got error don't understand , can't find documentation on internet.

here's method's signature :

- (void)displaydata:(nsarray *)datatodisplay withdecan:(nsinteger)decanindex;

in method want check number of items in datatodisplay array.

if ((i + 2) > [datatodisplay count]) { ...

i've tried datatodisplay.count nil change.

here's exact error message when "p datatodisplay.count" in console :

error: instance method 'count' has incompatible result types in different translation units ('unsigned long long' vs. 'nsuinteger' (aka 'unsigned long')) note: instance method 'count' declared here error: 1 errors parsing look

simplified way on how create array : array resulting asking coredata entities homecoming [[coredata selectallentitieswithname:[text entityname] withpredicate:predicate error:nil] sortedarrayusingdescriptors:@[descriptor]]; (coredata wrapper coredata stack)

add together returned nsarray nsmutablearray

if (daydata.count > 0) { [datatodisplay addobject:daydata]; }

then phone call displaydata: method

ios methods types nsarray runtime-error

No comments:

Post a Comment