Initial revision
authorclaus
Sat, 08 Jan 1994 18:30:44 +0100
changeset 18 850295468cac
parent 17 58c360f199be
child 19 4cde336c0794
Initial revision
OCInspView.st
OrderedCollectionInspectorView.st
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/OCInspView.st	Sat Jan 08 18:30:44 1994 +0100
@@ -0,0 +1,64 @@
+"
+ COPYRIGHT (c) 1989 by Claus Gittinger
+              All Rights Reserved
+
+ This software is furnished under a license and may be used
+ only in accordance with the terms of that license and with the
+ inclusion of the above copyright notice.   This software may not
+ be provided or otherwise made available to, or used by, any
+ other person.  No title to or ownership of the software is
+ hereby transferred.
+"
+
+InspectorView subclass:#OrderedCollectionInspectorView
+	 instanceVariableNames:''
+	 classVariableNames:''
+	 poolDictionaries:''
+	 category:'Interface-Inspector'
+!
+
+!OrderedCollectionInspectorView methodsFor:'user interaction'!
+
+showSelection:lineNr
+    "user clicked on an instvar - show value in workspace"
+
+    |val string|
+
+    workspace contents:nil.
+    lineNr == 1 ifTrue:[
+        val := inspectedObject
+    ] ifFalse:[
+        val := inspectedObject at:(lineNr - 1)
+    ].
+    string := val displayString.
+    workspace show:string.
+    selectedLine := lineNr
+! !
+
+!OrderedCollectionInspectorView methodsFor:'accessing'!
+
+listOfNames
+    "return a list of names to show in the selectionList"
+
+    |aList n cut|
+
+    aList := Text new.
+    aList add:'self'.
+    n := inspectedObject size.
+    (n > nShown) ifTrue:[
+        n := nShown.
+        cut := true.
+        listView setMiddleButtonMenu:menu2.
+    ] ifFalse:[
+        cut := false.
+        listView setMiddleButtonMenu:menu1.
+    ].
+    1 to:n do:[:index |
+        aList add:(index printString)
+    ].
+    cut ifTrue:[
+        aList add:' ... '
+    ].
+    ^ aList
+! !
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/OrderedCollectionInspectorView.st	Sat Jan 08 18:30:44 1994 +0100
@@ -0,0 +1,64 @@
+"
+ COPYRIGHT (c) 1989 by Claus Gittinger
+              All Rights Reserved
+
+ This software is furnished under a license and may be used
+ only in accordance with the terms of that license and with the
+ inclusion of the above copyright notice.   This software may not
+ be provided or otherwise made available to, or used by, any
+ other person.  No title to or ownership of the software is
+ hereby transferred.
+"
+
+InspectorView subclass:#OrderedCollectionInspectorView
+	 instanceVariableNames:''
+	 classVariableNames:''
+	 poolDictionaries:''
+	 category:'Interface-Inspector'
+!
+
+!OrderedCollectionInspectorView methodsFor:'user interaction'!
+
+showSelection:lineNr
+    "user clicked on an instvar - show value in workspace"
+
+    |val string|
+
+    workspace contents:nil.
+    lineNr == 1 ifTrue:[
+        val := inspectedObject
+    ] ifFalse:[
+        val := inspectedObject at:(lineNr - 1)
+    ].
+    string := val displayString.
+    workspace show:string.
+    selectedLine := lineNr
+! !
+
+!OrderedCollectionInspectorView methodsFor:'accessing'!
+
+listOfNames
+    "return a list of names to show in the selectionList"
+
+    |aList n cut|
+
+    aList := Text new.
+    aList add:'self'.
+    n := inspectedObject size.
+    (n > nShown) ifTrue:[
+        n := nShown.
+        cut := true.
+        listView setMiddleButtonMenu:menu2.
+    ] ifFalse:[
+        cut := false.
+        listView setMiddleButtonMenu:menu1.
+    ].
+    1 to:n do:[:index |
+        aList add:(index printString)
+    ].
+    cut ifTrue:[
+        aList add:' ... '
+    ].
+    ^ aList
+! !
+