# HG changeset patch # User claus # Date 758050244 -3600 # Node ID 850295468cac3cf5f8adab53fed61506467c1469 # Parent 58c360f199be8fbea03f7985723afbc52642ca48 Initial revision diff -r 58c360f199be -r 850295468cac OCInspView.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 +! ! + diff -r 58c360f199be -r 850295468cac OrderedCollectionInspectorView.st --- /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 +! ! +