DropTarget.st
changeset 2091 0fdd1265fd82
parent 1822 ceeb17948f5d
child 2251 7e4757269c0c
--- a/DropTarget.st	Tue Jan 24 11:34:04 2006 +0100
+++ b/DropTarget.st	Tue Jan 24 17:53:42 2006 +0100
@@ -43,8 +43,8 @@
     this class keeps the current target of the drop operation; the object respoonsible
     for the widget under the current mouse position.
 
-    receiver        <Object>        receiver to which the requests are sent. the
-                                    widget or an application.
+    receiver        <Object>        receiver to which the requests are sent. 
+                                    The widget or an application.
 
     argument        <Object>        user defined argument
 
@@ -71,7 +71,6 @@
     [author:]
         Claus Atzkern
 "
-
 ! !
 
 !DropTarget class methodsFor:'instance creation'!
@@ -123,18 +122,18 @@
      the arguments to the selector are:
         0       nothing
         1       aDropContext
-        2       aDropContext and the argument
-    "
+        2       aDropContext and the argument"
+    
     ^ canDropSelector
 !
 
-canDropSelector:something
+canDropSelector:something 
     "selector called to get a feedback if context is droppable.
      the arguments to the selector are:
         0       nothing
         1       aDropContext
-        2       aDropContext and the argument
-    "
+        2       aDropContext and the argument"
+    
     canDropSelector := something.
 !
 
@@ -223,8 +222,8 @@
      the arguments of the message are:
         0       nothing
         1       aDropContext
-        2       aDropContext and the argument
-    "
+        2       aDropContext and the argument"
+    
     ^ overSelector
 !
 
@@ -257,27 +256,27 @@
 !DropTarget methodsFor:'actions'!
 
 drop:aContext
-    "sent when the mouse button is released within the current widget."
+    "sent, when the mouse button is released within the current widget."
 
-    self perform:dropSelector withContext:aContext
+    self receiverPerform:dropSelector withContext:aContext
 !
 
 enter:aContext
-    "sent when entering the widget for the first time."
+    "sent, when entering a widget."
 
-    self perform:enterSelector withContext:aContext
+    self receiverPerform:enterSelector withContext:aContext
 !
 
 leave:aContext
-    "sent the last time, when leaving the widget."
+    "sent, when leaving a widget."
 
-    self perform:leaveSelector withContext:aContext
+    self receiverPerform:leaveSelector withContext:aContext
 !
 
 over:aContext
-    "sent whenever the mouse is moved over the widget."
+    "sent, whenever the mouse is moved over the widget."
 
-    self perform:overSelector withContext:aContext
+    self receiverPerform:overSelector withContext:aContext
 ! !
 
 !DropTarget methodsFor:'instance creation'!
@@ -300,8 +299,8 @@
 
 !DropTarget methodsFor:'private'!
 
-perform:aSelector withContext:aContext
-    "perform the selector"
+receiverPerform:aSelector withContext:aContext
+    "let the receiver perform the selector"
 
     aSelector notNil ifTrue:[
         ^ receiver perform:aSelector withOptionalArgument:aContext and:argument
@@ -314,7 +313,7 @@
     "send to the receiver to ask if the context is droppable"
 
     canDropSelector notNil ifTrue:[
-        ^ receiver perform:canDropSelector withOptionalArgument:aContext and:argument
+        ^ self receiverPerform:canDropSelector withContext:aContext
     ].
     ^ true
 ! !
@@ -322,5 +321,5 @@
 !DropTarget class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libview2/DropTarget.st,v 1.3 2003-10-06 15:29:36 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libview2/DropTarget.st,v 1.4 2006-01-24 16:53:42 cg Exp $'
 ! !