Archived Forum Post

Index of archived forum posts


Can you copy a CkStringArray to another CkStringArray?

Nov 12 '15 at 09:38

I need to do some processing on CkStringArrays from a mailman.GetUidls...

My GetUidls stores them in saUIDLall

I also build a manual CkStringArray from a SQLite Database and call it saUIDLdb.

I needed to know which elements are in saUIDLall that are NOT in saUIDLdb. I was going to use


to get the remaining left in saUIDLall (if understand substract correctly).

But before I do this, I don't want to "lose" what is in saUIDLall completely (for future processing). I thought I would "copy" saUIDLall to a temporary string array. I tried


that seemed to work (according to get_Count()) but after processing the saUIDLdb, the saUIDLtmp had the same # of records instead of the original count.

Is there a way to do this?



Accepted Answer

There might be a better way, but I think you could call the Serialize method on your source CKStringArray, then create a new CKStringArray and call AppendSerialized on it with the serialized source result.