[Q] Anyone know about how to drag & drop to the FCP?
site_archiver@lists.apple.com Delivered-To: pro-apps-dev@lists.apple.com Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Received:X-YMail-OSG:X-Yahoo-Newman-Property:Message-ID:Date:From:User-Agent:MIME-Version:To:Subject:Content-Type:Content-Transfer-Encoding; b=NXlbECfJVi7KJmb5XlCHFjy4zLtofIZKSOeVjkBcbFfSR49kCavVcZ7nDgtq8eGz3HIzmHmmYHD09qW4Kaz2e8iBRFsavZwm5ZOOb0CG44SwErAH4M5pbBGQ6zCBiqMD49uE0F0E3RAfJnPjIBmQHw5hQkWSnVnBLy7eO0VidvU= ; User-agent: Thunderbird 2.0.0.18 (Windows/20081105) Thanks. My code example is : In awakeFromNib In -tableView:writeRowsWithIndexes:toPasteboard: // Next index anIndex = [selectedRowIndexSet indexGreaterThanIndex:anIndex]; } ... Item Reference: 19884c10 Item Bounds (tlbr): { 86, 1, 104, 191 } Number of flavors: 0 Strangely, it doesn't have any flavor of data. Thank you in advance. Hi, When I dragged the same file from the Finder to the FCP, it shows : Number of Items: 1 1. Item Reference: 19884c10 Item Bounds (tlbr): { 86, 1, 104, 191 } Number of flavors: 2 1. Flavor Type: 'furl' Flavor Flags: 0 Length: 54 Data: 66 69 6C 65 3A 2F 2F 6C 6F 63 61 6C 68 6F 73 74 file://localhost 2F 56 6F 6C 75 6D 65 73 2F 31 37 32 2E 31 36 2E /Volumes/172.16. 32 34 36 2E 31 34 36 2F 4D 4F 56 2F 30 30 30 33 246.146/MOV/0003 59 42 2E 6D 6F 76 YB.mov 2. Flavor Type: 'hfs ' Flavor Flags: 300 Length: 80 Data: 4D 6F 6F 56 3F 3F 3F 3F 00 00 FF 98 00 00 00 13 MooV????........ 0A 30 30 30 33 59 42 2E 6D 6F 76 DC 00 00 00 00 .0003YB.mov..... FF FF FF FF 00 00 00 00 00 25 F0 A0 A0 31 60 34 .........%...1`4 91 F6 C0 A0 BF FF DA 80 84 04 20 42 91 F6 6B 44 .......... B..kD 91 F6 C0 A0 00 86 B4 00 17 BB 17 FC BF FF DA C4 ................ But if I drag one from my application to the FCP, it shows : Number of Items: 1 1. Item Reference: c0c0a Item Bounds (tlbr): { 219, 244, 219, 244 } Number of flavors: 2 1. Flavor Type: 'furl' Flavor Flags: 0 Length: 54 Data: 66 69 6C 65 3A 2F 2F 6C 6F 63 61 6C 68 6F 73 74 file://localhost 2F 56 6F 6C 75 6D 65 73 2F 31 37 32 2E 31 36 2E /Volumes/172.16. 32 34 36 2E 31 34 36 2F 4D 4F 56 2F 30 30 30 33 246.146/MOV/0003 59 42 2E 6D 6F 76 YB.mov 2. Flavor Type: 'hfs ' Flavor Flags: 0 Length: 80 Data: 00 00 00 00 00 00 00 00 00 00 FF 98 00 00 00 13 ................ 0A 30 30 30 33 59 42 2E 6D 6F 76 FC 00 25 DB A0 .0003YB.mov..%.. 00 00 00 06 00 18 80 00 00 00 00 60 00 25 8E B0 ...........`.%.. 90 10 7A 44 BF FF DA 70 44 04 20 42 90 10 7D EC ..zD...pD. B..}. 00 00 00 02 BF FF DA 90 00 00 00 20 BF FF DC F4 ........... .... The major difference between those are in the 2nd flavor type 'hfs'. Their flavor flags are different: one is 300, while the other is 0. Thank you. _______________________________________________ Do not post admin requests to the list. They will be ignored. Pro-apps-dev mailing list (Pro-apps-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/pro-apps-dev/site_archiver%40lists.ap... Hi. I read a post at http://cocoadev.com/forums/comments.php?DiscussionID=612 and wonder if it is not possible to make current Cocoa apps behave like the Finder. Is it still valid to use NSCreateFilenamePboard() function? When I used a returned string by calling the function, the Drag&Drop informaiton is quite different from that from the Finder. Even when I try NSURLPboardType with declareType.., it didn't generate matching "fURL" flavor. And it doesn't seem to me that it is possible to make "hfs" flavor also. With NSFilenamesPboardType, it can generate the "fURL" and "hfs" flavor, though. Should I use some Carbon calls? -- My previous post.. -- Hello. I found out that NSCreateFilenamePboardType() would help. So, I tried it like : NSString *quicktimeFileNamesPboardType = NSCreateFilenamePboardType(@"mov"); [myNSTableView registerForDraggedTypes:[NSArray arryWithObject:quickTimeFileNamesPboardType]]; NSString *quicktimeFileNamesPboardType = NSCreateFilenamePboardType(@"mov"); anIndex = [selectedRowsIndexSet firstIndex]; while( anIndex != NSNotFound ) { fileName = [NSString stringWithFormat:@"%@/%@.mov", configPath, [[dataArray objectAtIndex:anIndex] name]]; [fileNamesArray addObject:fileName]; [pboard declareTypes:[NSArray arrayWithObjects:quicktimeFilenamesPboardType, nil] owner:nil]; isSuccessful = [pboard setPropertyList:fileNamesArray forType:quicktimeFilenamesPboardType]; When I check what information is exported from my program with the Drag Peeker X, it shows : Is there anything wrong how I use the NSCreateNSFilenamePboardType? How to use it properly? P.S. By the way, is it normal to put 'furl' and 'hfs' flavor when NSFilenamesPboardType is used? Because an array of file names are added to the pasteboard, I thought that only file name strings were added. But it turned out no-so-true. JongAm Park wrote: Thanks to a utility program, called DragPeeker X, I found out some clue why the FCP treated dragged file as a file with unknown type. ( I also tried NSURLPboardType and NSFileContentsPboardType. But they didn't make information like above appear. ) The PboardType I used was NSFilenamesPboardType. What actually matters, I think, is the data of the 2nd flavor. The one using the Finder starts with MooV????, which says that the dragged item is a QuickTime movie, while the one from my application doesn't contain anything. ( all 0's. ) So, is there any way to mark that the interested file is in a specific type, i.e. QuickTime movie file? This email sent to site_archiver@lists.apple.com
participants (1)
-
JongAm Park