Copy/paste multiple table rows
Copy/paste multiple table rows
- Subject: Copy/paste multiple table rows
- From: Matthew Roberts <email@hidden>
- Date: Fri, 13 Sep 2002 10:16:50 -0500
OK... I've been working on my first Cocoa app for about a month now, and
it's coming along really well. And while I'm not an Obj-C genius by any
means, I like to think I'm not really a newbie anymore. However, I've got
what amounts to a newbie question, and I couldn't find a real answer
anywhere I looked (this list's archives; OmniGroup's dev list archives;
Cocoadevcentral).
I have a document-based app; each doc's window chiefly consists of a table
of items. So far I can drag rows out of the table into other apps--no
problem. I also have it so that I can copy/paste rows into the table itself
(for duplicating items, moving them between documents, etc).
However, I can't figure out the way to copy and paste (or I guess drag)
multiple rows within the document. The table datasource is a mutablearray
of dictionaries (keyed by field name which translates into column
titles)--pretty standard.
When dragging stuff out of the table, I can drag multiple rows and the end
result is just what I want (the rows get passed through a format parser and
end up just as a single string of text on the drag pasteboard). Only one
thing gets put onto the pasteboard.
What's the best way to approach copy/paste/drag of items within the document
when I want to preserve the dictionary structure of the items? Is there
some way to "compress" the dictionaries (e.g. Via description accessor or by
coder) and then add the compressed info to the pasteboard just as one data
object? Or is there someway to queue up multiple objects (e.g.
Dictionaries) onto a pasteboard, determine how many there are, and then add
them back to the document?
Hope I've been clear--seems like there should be an easy answer. Any help
is appreciated.
_________________________________
Matthew Roberts (email@hidden)
Webmaster, Dept. of Political Science
Instructional Technology Fellow
University of Minnesota
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.