PDA

View Full Version : copiny nsmutablearray to nsmutablearray




StefanDevil
Aug 22, 2010, 04:17 PM
Hi there,

Here is what i am trying to do: selected a table cell, save it to array and before controller exit save array to file.

now i decide to implement an alertview, if ok is press than the table cell will be save to array.

i can only thinking of using a temp array to save the table cell 1st, and when ok is press, transfer the temp array to original array. or is there other better ways?

and how such i go about copying nsmutablearray to each other?
i tried using

[self.data addObjectsFromArray:self.temparray]

only, am i missing somthing?

thks



dejo
Aug 22, 2010, 04:43 PM
i tried using

[self.data addObjectsFromArray:self.temparray]

...and? What happened? We shouldn't have to guess. And remember, be specific. "It didn't work" is not the right answer. Did you do any basic debugging yet? If so, what and what did you find out?

P.S. Don't be a Help Vampire (http://slash7.com/2006/12/22/vampires/). Here's some tips on Getting Answers (http://www.mikeash.com/getting_answers.html).

chown33
Aug 22, 2010, 04:45 PM
Post your code.

Describe what you expected to happen.

Describe what actually happened. Be specific.


Your current description is far too vague, and includes far too little code, for anyone to understand what the problem is, much less figure out how to fix it.

You must post enough code for someone else to understand what it's doing, not just one line. We can't see your screen. We can't read your files on disk. We don't know if this is a new question, or if you're asking about one of your earlier posts. If you are posting about an earlier question, you should be adding to that thread, not starting another one. If you're not posting about an earlier question, then you have to assume we haven't read any of your earlier questions.

StefanDevil
Aug 23, 2010, 02:24 AM
hi there, manage to solve it, thks for the advice!