i want copy data app numbers or excel sheet. data consists of integers, images. try accomplish first putting data in nstableview, , writing data pasteboard via method:
- (bool)tableview:(nstableview *)tv writerowswithindexes:(nsindexset *)rowindexes topasteboard:(nspasteboard*)pboard { nsarray * datatopaste = [nsarray arraywithobjects:[nsstring stringwithformat:@"%ld \t %ld \t %ld \t %ld \t %ld \t %ld \t %ld \t %ld \t", data1, data2, data3, data4, data5, data6, data7, data8], [an nsimage], nil]; [pboard writeobjects:datatopaste]; return yes; } if don't add nsimage @ end, data copied nicely, add nsimage array, image gets copied, , if add 2 nsimages, first gets copied. have missed?
any ideas appreciated!
edit: btw, realized not numbers.app manages drag copy cells both text , images neither excel nor textedit. between numbers files works however.
nsarray * datatopaste = [nsarray arraywithobjects:[nsstring stringwithformat:@"%ld \t %ld \t %ld \t %ld \t %ld \t %ld \t %ld \t %ld \t %@", data1, data2, data3, data4, data5, data6, data7, data8], [an nsimage], nil]; [pboard writeobjects:datatopaste];
use "%@" format specifier image, %ld nsnumber, may solution.
Comments
Post a Comment