Re: cocoa-dev digest, Vol 1 #599 - 16 msgs
Re: cocoa-dev digest, Vol 1 #599 - 16 msgs
- Subject: Re: cocoa-dev digest, Vol 1 #599 - 16 msgs
- From: Simon Stapleton <email@hidden>
- Date: Thu, 20 Sep 2001 09:53:41 +0100 (BST)
>
From: Brian Webster <email@hidden>
>
Subject: Re: Dragging an item to the Dock - HELP
>
Cc: Steve Gehrman <email@hidden>
>
To: email@hidden
>
>
On Wednesday, September 19, 2001, at 12:15 AM, cocoa-dev-
>
email@hidden wrote:
>
> I also can't drag items to the Trash Can. The trash can
>
> highlights, but
>
> when the item is dropped, the file does not move to the trash. Is
>
my
>
> app responsible for the move?
>
>
Yes, your app is responsible for the move. To process a drag to
>
the trash, implement the draggedImage:endedAt:operation: method
>
in your dragging source. If the file is dragged to the Trash,
>
the operation argument will be NSDragOperationDelete.
Hmmm. I was looking to do this myself (but not for files) and for
some reason didn't manage to find NSDragOperationDelete. I guess I
didn't look hard enough ;-)
>
You can
>
use NSWorkspace's
>
performFileOperation:source:destination:files:tag: method to
>
move the file(s) to the trash.
Does anyone know what pasteboard types the trashcan accepts? My
modelling tool currently allows you to drag an entity off a diagram
and onto (for example) textedit, and gives textedit a bunch of DDL -
I'd like to be able to drag stuff off my application straight to the
trash, recognise the fact, and delete the item(s).
Simon
--
PGP Key ID : 0x50D0698D
--
If the answer isn\'t obvious, the question is a distraction. Go find
an easier question.