In the LR, an example is given in the page for DragItem.Destination
:
[code]Function MouseDown(X As Integer, Y As Integer) As Boolean
#Pragma unused X
#Pragma unused Y
Dim di As DragItem
Dim f As FolderItem
Dim d As Date
Dim tos As TextoutputStream
d = New Date
f = SpecialFolder.Temporary.Child(“test” + Format(d.TotalSeconds, “#”))
If f <> Nil Then
tos = TextOutputStream.Create(f)
tos.Write(“Howdy! Created by DragToFinder example.”)
tos.Close
di = New DragItem(Self, 0, 0, 100, 100)
di.FolderItem = f
di.Drag
// If di.Destination <> Nil Then
// If di.Destination IsA FolderItem Then
// MsgBox(FolderItem(di.Destination).AbsolutePath)
// End If
// else
// MsgBox "This is Else from If di.Destination <> Nil Then."
// End If
Else
MsgBox(“Unable to get FolderItem for temporary file.”)
End If
End Function[/code]
Note above, the changes: I commented out a block after I added the Else
part, because I always get the Else
report.
I was working with a real project and have some trouble, so I started to explorate until I found If di.Destination <> Nil Then
is always Nil
.
With or without, I get the SimpleText Document created where I release the Mouse.
That leads me to the conclusion the code is useless.
Whats your feeling ?
BTW: In my project, I am working with Picture / Canvas
Read my other report for details (if I can say that).