1) Clipboard (US Clipboard Extensions)
You can get filenames from the Clipboard using
#getFilenamesIfNone:
or simply using #getFilenames:
filenames := Clipboard [].
filenames := Clipboard .
2) (Native) Drag&Drop (US DragAndDrop Extensions)
This package allows you to get filenames from a Drag&Drop Session using
#dragFilenames:
:
filenames := aDragDropSession
E.g. you can use it in the following D&D code:
onDragOverList: aDragDropSession
| filenames |
filenames := self
aDragDropSession .
aDragDropSession
(filenames
[#copy]
[#none])
onDropOverList: aDragDropSession
| filenames |
filenames := self
aDragDropSession .
filenames
[self filenames]
#filterFilenames:
is one of my methods which selects only extensions acceptable for the Application.Both packages are part of my goodies which are available on this site.
No comments:
Post a Comment