script myImageWellScript
property parent : class "NSImageView"
on performDragOperation_(sender)
-- Get the file path
set pb to sender's draggingPasteboard()
set theFiles to pb's propertyListForType_("NSFilenamesPboardType")
set filePath to item 1 of (theFiles as list)
tell current application's NSApp's delegate() to setPathtoPicture_(theFiles)
return true -- otherwise it doesn't happen
end performDragOperation_
end script