How to copy DAdatatable in Cocoa

(jasonli) #1

Dear All,
I try to copy a DADatatable with records already load in Cocoa , but how should I Copy it to another instants that I need to handle with different filters.

also, I am wondering how I should create a memTable in with DADatatable in Cocoa?

0 Likes

(marc hoffman) #2

Can you elaborate on what exactly your goal is? You have a DADataTable instance with data already downloaded, and you want a second instance that has a full independent copy of the same data, not sharing the actual rows?

If so, the best way to achieve this is, probably, to save the data to a binary and re-read it into a fresh copy.

But the bigger questions us, what’s your endgame with the two sets of data, and dot ihr Wally need them, or do you maybe just want two views into the same data? Are you planning to make changes to the rows in either table? Submit them back to a server?

—marc

0 Likes

(jasonli) #3

Thanks Marc,
I just use it for 2 different combobox list data with 2 DADataTableControllers, though DADa , what’s the best way to save to binary and read it back ? with DABin2DataStreamer ?

0 Likes

(marc hoffman) #4

Jason,

that’s what I expected — you dont even need two copies of the database for that! You can just obtain the set of rows twice, (using different filters/sorting, if necessary), and then use either to populate each NSPopupButton.

0 Likes