I have an NSBroswer with a series of entries that look up a text blob. If the 
blob exists then:

- (BOOL)browser:canDragRowsWithIndexes:inColumn:withEvent: returns YES.

This invokes - (BOOL)browser:writeRowsWithIndexes:inColumn:toPasteboard:

In here I do the following:

NSUInteger changeCount;
BOOL retBOOL = YES;

changeCount = [pasteboard clearContents];
changeCount = [pasteboard declareTypes:@[NSPasteboardTypeString, 
NSPasteboardTypeHTML]
                                owner:self];
didSet = [pasteboard setString:self.currentHTMLCode
                      forType:NSPasteboardTypeString];
retBOOL = retBOOL & didSet;
didSet = [pasteboard setString:[NSString stringWithFormat:@"<pre>%@</pre>", 
self.currentHTMLCode]
                      forType:NSPasteboardTypeHTML];
retBOOL = retBOOL & didSet;

Now the data analysis of the pasteboard coming out (with retBOOL: Yes) is:

pasteboard: : <NSPasteboard: 0x101931870>
    name: : Apple CFPasteboard drag
    change count: : 77
    types: : (
   "public.utf8-plain-text",
   NSStringPboardType,
   "public.html",
   "Apple HTML pasteboard type"
)
    items: : (
   "<NSPasteboardItem: 0x1005a5cb0>"
)
        PBItem: : <NSPasteboardItem: 0x1005a5cb0>
            PBType: : public.utf8-plain-text
                String for type [public.utf8-plain-text] = 89958 characters
            PBType: : public.html
                String for type [public.html] = 89969 characters
retValue: YES

So my problem is that when I drag this to SimpleText or BBEdit, nothing drops. 
I don't see a highlight of the target document. (Note: I also have a drag image 
routine, and I see the drag image)

Any ideas why I seem to be populating the pasteboard but it refuses to drop in 
the other app?

Thanks,
-Andrei

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to