On 29 May 2010, at 23:16, Joshua Shapiro wrote:
[...] Is there a way I can format this string data so that textmate recognizes it is a columnar selection?
You need to store a property list as the OakTextMatePboardType with a ‘content’ key (actual string) and ‘rectangular’ set to the string value YES.
E.g.:
id plist = [NSDictionary dictionaryWithObjectsAndKeys: @"foo\nbar\n", @"content", @"YES", @"rectangular", nil ];
NSPasteboard* pboard = [NSPasteboard generalPasteboard]; [pboard declareTypes:[NSArray arrayWithObject:@"OakTextMatePboardType"] owner:nil]; [pboard setPropertyList:plist forType:@"OakTextMatePboardType"];
In practice you also want to provide an NSStringPboardType alternative.
Note that this is not a documented pasteboard type so no guarantees about future compatibility with this format etc.