On Montag, August 28, 2006, at 02:08  Uhr, Andreas Höschler wrote:

By the way, if I want to drag a string (path) from my app to Terminal.app what pastboard type do I need to use? Is Terminal.app able to work as a drag
target?

Yes, Terminal.app can be a drop target. I use it all the time with GWorkspace.app.

Hmm, any idea how the pasteboard is to be set up? In my application (drag source) I am doing

NSArray *types = [NSArray arrayWithObjects:NSFilenamesPboardType, NSStringPboardType, nil];
      [pboard declareTypes:types owner:nil];
[pboard setPropertyList:[NSArray arrayWithObject:path] forType:NSFilenamesPboardType];
      [pboard setString:path forType:NSStringPboardType];

I can drag from my application, but dropping is refused by Terminal.app!? :-(

I have just looked into the Terminal sources. There I find

        [self registerForDraggedTypes: [NSArray arrayWithObjects:
                NSFilenamesPboardType,NSStringPboardType,nil]];

It should work. I am able to drag from my application to TextEdit.app. But Terminal.app still refuses to accept the drag operation. I have put a log in

-(BOOL) performDragOperation: (id<NSDraggingInfo>)sender
{
}

in the terminal sources, but this method is never called when I drag to a Terminal.app window!?

Any ideas?

Could anyone who has Terminal.app running on Solaris send me his Terminal.app sources?

Thanks!

Regards,

  Andreas







_______________________________________________
Discuss-gnustep mailing list
Discuss-gnustep@gnu.org
http://lists.gnu.org/mailman/listinfo/discuss-gnustep

Reply via email to