Unified Contacts

12 April, 2015

Problem When Appending Tuple into Array

I've got the following error message when trying to append a tuple into an array.

Missing argument for parameter #2 in call

Here is my tuple
    (String, UInt64, NSDate?)

I get the tuple from another function and then append to the array

var fileRecords: [(String, UInt64, NSDate?)]?

var tuple = createArchive()
self.records!.append(tuple!)    <- error here

However, if I assign the tuple to a constant first and then append that constant to array. It is work.

var tuple = createArchive()
let aTuple = tuple!
self.records!.append(aTuple)    <- Okay

No comments:

Post a Comment