SelectionInListView.st
changeset 1744 f7d712e4b79e
parent 1725 532f89cec6ae
child 1745 cca5376d130d
--- a/SelectionInListView.st	Wed Feb 17 14:11:59 1999 +0100
+++ b/SelectionInListView.st	Wed Feb 17 16:07:22 1999 +0100
@@ -119,6 +119,8 @@
         selectConditionBlock    <Block>         if non-nil, this nlock can decide if selection is ok
 
         doubleClickActionBlock  <Block>         action to perform on double-click
+                                                (1-arg blocks gets selectionIndex as arg,
+                                                 2-arg block gets index and selectionValue as args)
 
         listAttributes                          dont use - will vanish
 
@@ -2241,6 +2243,7 @@
 !
 
 doubleClicked
+    |nA|
 
     clickLine := nil.
 
@@ -2263,7 +2266,17 @@
     "/
     "/ ST/X action blocks
     "/
-    doubleClickActionBlock notNil ifTrue:[doubleClickActionBlock value:selection].
+    doubleClickActionBlock notNil ifTrue:[
+        (nA := doubleClickActionBlock numArgs) == 2 ifTrue:[
+            doubleClickActionBlock value:selection value:self selectionValue
+        ] ifFalse:[
+            nA == 1 ifTrue:[
+                doubleClickActionBlock value:selection
+            ] ifFalse:[
+                doubleClickActionBlock value
+            ]
+        ]
+    ].
 
     "Modified: / 26.10.1997 / 18:51:39 / cg"
 !
@@ -3589,5 +3602,5 @@
 !SelectionInListView class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libwidg/SelectionInListView.st,v 1.136 1998-12-02 16:59:40 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libwidg/SelectionInListView.st,v 1.137 1999-02-17 15:07:22 cg Exp $'
 ! !