...
// FINALLY!!
// Okay HFS File promises work through a bit of black magic,
// I have h4x0red into it without revealing too much of it's workings
here
// I should edit this later to maintain whatever other info was on
the pboard
if ( [[pboard types] containsObject:NSFilesPromisePboardType] ) {
NSArray *promisedTypes = [[pboard
propertyListForType:NSFilesPromisePboardType] retain];;
NSFilePromiseDragSource *aFSource = [[[NSFilePromiseDragSource
alloc] initWithSource:sourceObject] autorelease];
[pboard declareTypes:[NSArray
arrayWithObjects:NSFilesPromisePboardType, @"CorePasteboardFlavorType
0x70686673", @"CorePasteboardFlavorType 0x66737350",
@"NSPromiseContentsPboardType", nil] owner:aFSource];
// Construct the HFS Flavor for the Finder to use on Drop
PromiseHFSFlavor aFlavor;
memset( &aFlavor, 0, sizeof(aFlavor) );
if ( [promisedTypes containsObject:@"'fold'"] ) aFlavor.fileType =
'fold';
aFlavor.fileCreator = '????';
aFlavor.promisedFlavor = 'fssP';
NSData *flavorData = [NSData dataWithBytes:&aFlavor length:14];
[pboard setPropertyList:promisedTypes
forType:NSFilesPromisePboardType];
[pboard setData:flavorData forType:@"CorePasteboardFlavorType
0x70686673"];
// Cleanup
[promisedTypes release];
}