Help with a deep copy

What is the best practice for sending doing a deep copy between two View Controllers in an iPhone app. I've designed an app that sends over arrays of arrays and the deeper items aren't coming over as easily as I thought. Do you explicitly copy? Just alloc placeholders and set them equal? Links to any samples would be greatly appreciated.
Is it a best practice to avoid that kind of data passing - as being overly complex?
Background:
I'm building an iPhone application where I need to send a complex object from one view controller to another - This complex object is an array of arrays of objects.
I can't just copy a reference to the complex object over to a variable on the receiving view controller, as none of the nested array contents come over.
So I think I need to do a deep copy - but need advice on best practices for that. The array of arrays contain objects, so ideally, Id just be able to :
Thanks for any advice!

There are many ways of solving this.
One way is to centralize the information:
You create a singleton class that is the datasource for both view, so you don't need to pass in anything. If you can't do that because the datasources are generally different except for this specific array of arrays, then make the singleton class be the source of that array and nothing else.

Similar Messages

  • Can anyone help with "attempting to copy. Unknown error (-69)"? Please?!

    I've downloaded itunes onto my computer and connected it to my ipod nano but when i try to sync it a couple of songs are transfered but then it comes up with
    "Attempting to copy to the disk "(name of ipod)" failed. An unknown error occurred (-69)."
    I've already tried restoring factory settings, re-downloading itunes as well as the usual restarting everything and i've gone through the basic help system on this website but nothing's worked.
    Any advice from those wiser than me would be greatly appreciated

    See if this helps: iTunes displays a -69 error when syncing iPod

  • Help with SQL*Plus COPY Command syntax

    Hello people.
    DBs are 10g
    PROD DB is a remote DB (over DB Link)
    TEST DB is where my SQL*Plus is logged in.
    LOCAL_DB_TABLE is the table I need to create to TEST DB
    REMOTE_DB _TABLE is the table that already exists in remote PROD DB
    COPY FROM replica/replica@PROD
    CREATE LOCAL_DB_TABLE@TEST
    ROW_ID,
    CREATED,
    CREATED_BY,
    UPD,
    UPD_BY
    USING SELECT
    ROW_ID,
    CREATED,
    CREATED_BY,
    UPD,
    UPD_BY
    FROM REMOTE_DB_TABLE
    WHERE ROW_ID='XXX';The error message I am getting:
    usage: COPY FROM <db> TO <db> <opt> <table> { (<cols>) } USING <sel>
      <db>   : database string, e.g., hr/your_password@d:chicago-mktg
      <opt>  : ONE of the keywords: APPEND, CREATE, INSERT or REPLACE
      <table>: name of the destination table
      <cols> : a comma-separated list of destination column aliases
      <sel>  : any valid SQL SELECT statement
    A missing FROM or TO clause uses the current SQL*Plus connection.
    CREATE LOCAL_DB_TABLE@TEST
    ERROR at line 1:
    ORA-00901: invalid CREATE commandThank you in advance for your help.

    Hi,
    I hope you are thinking of Creating a Table with the Same Structure as the remote database Table, If so.
    You can create a Table from the Existing Table using CTAS(Create Table as Select).
    Provided, you have created a Database Links between the 2 Databases. You can create a
    table in your Schema as,
    CREATE TABLE local_db_table AS
    SELECT * FROM remote_user_name.remote_db_table@dbname;Thanks,
    Shankar
    Edited by: Shankar Viji on Jul 19, 2012 11:01 PM

  • Help with large file copy to WKS

    I need to copy a folder and all of it's contents from
    \apps\reallybigfolder to each workstation at c:\putithere.
    Because of the size of the file copy, I chose to create an app object
    with logic that says if xxx.exe exists then do not push. Basically, I
    don't want this thing to just run constantly. I need it to run one time
    to each workstation on the network when the users log in.
    I have tried pointing the app object to \public\ncopy.exe and then
    setting the parameters the way I want them, but I keep getting an
    error: "Cannot load VDM IPX/SPX Support". The two files in the folder
    are copied, but the subfolders are not. I have tried using the /s/e
    switches, but it does not help.
    I have also tried writing a .bat file, to test it - but I get the same
    results as above. So next I tried using copy instead of ncopy. I do not
    get the error message, but it still does not copy any of the subfolders.
    Is there another way? An easier way? I really appreciate the help.
    Tony

    What you are doing should work.
    It sounds as if there are some other workstation issues going on.
    I don't think I seen or could make the error "Cannot load VDM IPX/SPX
    Support" happen if I tried. Perhaps this would happen w/o a Novell
    Client installed. In such a case you could use XCOPY or ROBOCOPY.
    (Robocopy is way cooler than XPCOPY and is free from MS.)
    You can also use the "Distribution Tab" and the "Files" section to copy
    entire directories. Just use *.* as the source.
    [email protected] wrote:
    > I need to copy a folder and all of it's contents from
    > \apps\reallybigfolder to each workstation at c:\putithere.
    >
    > Because of the size of the file copy, I chose to create an app object
    > with logic that says if xxx.exe exists then do not push. Basically, I
    > don't want this thing to just run constantly. I need it to run one time
    > to each workstation on the network when the users log in.
    >
    > I have tried pointing the app object to \public\ncopy.exe and then
    > setting the parameters the way I want them, but I keep getting an
    > error: "Cannot load VDM IPX/SPX Support". The two files in the folder
    > are copied, but the subfolders are not. I have tried using the /s/e
    > switches, but it does not help.
    >
    > I have also tried writing a .bat file, to test it - but I get the same
    > results as above. So next I tried using copy instead of ncopy. I do not
    > get the error message, but it still does not copy any of the subfolders.
    >
    > Is there another way? An easier way? I really appreciate the help.
    >
    > Tony
    Craig Wilson
    Novell Product Support Forum Sysop
    Master CNE, MCSE 2003, CCN

  • HELP with Advanced Options - Copy Audio into Movie

    Thanks for the discussions! I need REAL help - QUICK! I have Keynote 2.0.2 - that I just purchased Dec. 2005. Stupid me! I should have Keynote 3, but I don't.
    Why can I NOT save my presentation with audio? Under "Save As," "Advanced Options," I am not able to make use of this option! And when I export my presentation as a QuickTime Movie, it has NO audio!
    I need to share this presentation soon and will be very disappointed if I cannot use it.
    Thanks for any help you might give!
    Cambo Mom

    thats what i mean i do not get this option. Even in data view when i click on the data tab i see the data but can not edit it. I am using microsoft sequel server database. Has anyone had sucess editing data from oracle sql developer to microsoft sequel database??

  • Help with Automator to copy text from multiple files

    Hello,
    I'm new to automator and applescript but it seems like what I'm trying to accomplish is fairly easy.
    I'd like to run a workflow that will open a text file, copy the contents, paste the contents into a given application and then take a screenshot.
    I'd like to be able to do this for several hundred text files.
    I've tried with a Service but can't figure out how to provide the text input after "Get Specified Finder Items".
    Get Specified Finder Items --> Get Contents of TextEdit Document --> Copy to Clipboard --> results in no data.

    You'll need to use Applescript (you could use the Automator Run Applescript Action).
    set recipientAddress to do shell script "cat <filename.txt>"
    set theSubject to "Type your subject here!"
    set theContent to "Type your message content here!"
    tell application "Mail"
      activate
              set theMessage to make new outgoing message with properties {subject:theSubject, content:theContent, visible:true}
              tell theMessage
      make new to recipient with properties {address:recipientAddress}
      -- Uncomment send to Send the Message:
      -- send
              end tell
    end tell

  • Please help with how to copy CS3 from iMac (Snow Leopard) to MacBook Air (Mavericks)

    I have a 2006 Mac Desktop computer with the CS3 suite on it.  I still have the discs for the suite and would like to move it over to my macbook air.  I tried to just copy the Photoshop file, but that didn't work. Is there an easy way to migrate these files from one mac to another?  My MacBook Air does not have a DVD drive. Ideally, I would like to have these files on both computers, as I believe you can have your purchased programs on 2 computers.  Anyone have a a quick and easy way to make this happen?

    Never, ever migrate. CS installs are "Machine specific", you break licensing doing that.
    Go here: Download CS3 products and download the installer for your suite onto your new Mac.
    Gene

  • Help with printing hard copy from Acrobat PDF

    Copy created in InDesign and printed to Adobe PDF is OK on screen but printing hard copy with random chunks of text missing. Same on both my printers, doesn't happen with doPDF. Any ideas? Thanks

    I suspect that what you are asking is simply to print to a new PDF with print as image selected. You can also save as an image file and then open the images as a new PDF.

  • Need help with trying to copy or determine filter settings

    I applied two different filters to two separate  layers in photoshop. I kinda forgot the exact settings and I need to  find a way to apply the filter settings to multiple layers in separate  documents. Is there any way to determine what the filter and it's  settings where or a way to copy a filter on a layer from one document to  another?
    Thanks for the help.

    Thanks guys for the help. The Migration Assistant did not work. The only choices to use Migration assistant were to connect an old computer, use Time Machine, or use a OS X partition. So just having a copy of the home folder did not seem to work there.
    However, copying the contents of each folder worked like a charm and now my computer is exactly as it was before.
    Thanks again for taking the time to respond to my issue.
    Owen Pillion

  • Help with Xi System Copy

    Hi All,
    I have been given a Task to refresh an Xi system with current XIP. First attempt using SAP's "System Copy for SAP
    Systems Based on SAP NetWeaver 7.0 SR2 ABAP+Java"
    version July 07 failed. The above talks about doing a refresh using "SAPinst" which we cannot do, so we are doing the actual DB copy and then do the actual reconfig. I can get the ABAP stack done but the JAVA is a major problem and as soon as I bring the Java up, if an invoice or something shows up the Actual XIP gets screwed. So is there a proven Xi refresh Doc somewhere I can use.
    thanks in advance.
    Zeeshan

    Hi,
    for No. 2, please refer to OSS-NOTE 886102.
    for No. 1: not as far as i know. So it's either manually or, if it is a Qualitiy assurance system, reimport al transport requests or else, restore the sttings before the copy (out of the backup) an perform it again, using the hints out of OSS Note 886102.
    BDLS only will not work.
    hth
    cheers
    sven
    Message was edited by: Sven Muntermann

  • Help with paste and copy

    My copy and paste is not working on my trail?

    You may know this, so apologies if you do, but in PSE you must first select something before you can copy it. If you want to copy an entire photo, press Ctrl+A (command+A on a mac) to select the whole thing.

  • Help with Rules to Copy all Sent and Received Mail

    Friends:
    1. I have created a rule to copy all sent mail to a folder as follows:
    mail>prefs>rules>add rule>description:All Sent Mail>To Contains @>Coppy Message to All Sent Mail folder
    Is there a better way to do this?
    2. Similarly I tried the above for a folder "All Received Mail" replacing "To" to "From" but it doesn't work. What is a good way to copy all sent mail?
    Thanks amigos,
    Migs

    I have been using
    If Any Account is <Account in question> then Copy message to <local archive folder>
    It has its quirks (I have it as the last rule in the list) but for the most part is sort of working to make copies of incoming mails.
    It does not copy outgoing mails.
    It would be nice if Mail offered some sort of "copy on send, copy on receive" functionality in the preferences for those of us who don't trust the "cloud" to not reach into our computers and delete our mail (as happened when our IMAP server ran out of disk space once).

  • Hi, I have a problem with getting my apple Id working for me. It's been 2 months since it happened and Apple failed to act. I can tell my story proerly, but am not sure, you guys can help, so I just copy my message to them today, I am trying to get it acr

    Hi, I have a problem with getting my apple Id working for me. It's been 2 months since it happened and Apple failed to act. I can tell my story proerly, but am not sure, you guys can help, so I just copy my message to them today, I am trying to get it across all the places around to pay their attention. This is a desperate move, so if you are not the right people to help me to get my message accross, may be you can advise where can I go.
    Thank you, and sorry for the language.
    Vitas Dijokas
    I am sorry to say that, but your security makes my life miserable – it’s been 2 months since my Apple ID account got stuck, and since then I cannot update 37 applications (to date), i.e. most of my applications. Half of them I bought. I also paid for iCloud, and it is not working. I paid money and I am stuck with old applications and no iCloud. Your security *****. Your service ***** too. It took your service 1 month to finally understand why this happened to me, and it took me tens of emails to you and 3 hours of telephone conversation to find out the reason for my problem. And the problem is still not fixed. NOT FIXED. You just leave your customer – the one who paid you money and spent so much time with you trying to help you help me – and nothing. You tell me:  “Vitas, Stick your stinky iphone in your *** and enjoy life, we do not care!” *************.
    It is ******* outrageous, and you should know that,  guys. Get into the ******* database and correct the bug. Get someone in the partners-telephone carriers company (it is Orange as carreer and Cellcom as seller of the phone)  authorized to Identify me in personal encounter in one of the branches in Israel (where I live) and make sure it is really me, and get the ******* system accept my password and let me use my phone.
    Otherwise **** off. None of my friends will get my advise to buy an iphone or any of apple products. And I think you should be very attentive to cases like this, guys. Do your work for the money we pay, or disappear. There are many others eager to take your place, and if the problem is not fixed I will eventually go to the others. My patience is lost, and as soon as I can afford another phone I will change it. AND I WILL TRY TO GIVE BAAAAAD PUBLICITY TO APPLE – I am threatening here, so ACT NOW.
    Vitas Dijokas

    Well, it seems waiting is not my strong suit..! I renamed a javascript file called recovery to sessionstore. This file was in the folder sessionstore-backups I had copied from mozilla 3 days ago, when my tabs were still in place. I replaced the sessionstore in mozilla's default folder with the renamed file and then started mozilla. And the tabs reappeared as they were 3 days ago!
    So there goes the tab problem. But again when I started mozilla the window saying "a script has stopped responding" appeared, this time the script being: chrome//browser/contenttabbrowser.xml2542
    If someone knows how to fix this and make firefox launch normally, please reply! Thank you

  • Help with the error message that ADE is not allowed to copy a book onto my Nook. I have tried authorizing and unauthorizing many times--at wits end with this issue.

    Help with the error message that ADE is not allowed to copy a book onto my Nook. I have tried authorizing and unauthorizing many times--at wits end with this issue.

    I too am having the same problem. I have a new hard drive that was imaged from the old one and I'm trying to side load a book to my Nook Simple Touch.. I first installed ADE 4 then borrowed and downloaded a book from Overdrive. I tried a few times to delete and reauthorize both the computer and the Nook and each time I get an authorization error when I try to side load the book. I then found on the Nook forum that the Simple Touch and ADE 4 don't get along. So I uninstalled ADE 4 and installed ADE 3.
    I then followed this recommended procedure found on the forum: I deleted the Digital Editions folder from my Nook, launched ADE 3 and authorized the computer, then connected the Nook. For a few seconds, hovering the mouse over the setting icon for the Nook displayed everything on the context menu grayed out. But then it showed the context menu and I was able to display the Nook's authorization, which was the same as the computer's. Still get the same error side loading the book. Deleting and reauthorizing doesn't help.  And the Digital Editions folder is still missing from the Nook.

  • Need help with copying files onto external drive

    I need help! Trying to copy downloaded movie files from Vuze (which have downloaded successfully) and copy onto external hard drive to view them but it wont let me copy over to the external device. Any ideas how to fix this please???

    Can you explain the steps you used, and the error message (or symptom), that says the copy did not work? 

Maybe you are looking for

  • How to use mac's full screen functionality with Adobe acrobat XI?

    I recently switched to mac, so font have  much experience with this. My adobe reader is missing mac's full screen functionality (the two arrows on right that make mac fullscreen). so, if i have three pdfs open, i cannot switch between them using the

  • Unable to enjoy Wi Fi features

    Hi, I have enabled Wifi and I  setup Wifi Successfully. But Im not able to connect internet and its saying that "Unable to connect to the internet Please try agian later. If the Problem persist please contact your service provider" Please help in thi

  • Data binding and screen communication

    It seems to me that the "backing bean" concept for a view is becoming the common way to implement JSF pages. I just wanted to get some feedback on something I was thinking about concerning the data that the components bind to and communication betwee

  • HT4623 how do you unlock an iphone  forgot the password

    how do you unlock an iphone when you forgot the password

  • Stuck in Limbo?

    I recently changed the email address on my itunes account. The "Confirm Email Address" link in the confirmation email says that the new address is already confirmed. However, the iTunes login says i still have to confirm my new email.    So, now I ca