diff -r 06bef91cb861 -r eec155f1b037 ResourceSelectionBrowser.st --- a/ResourceSelectionBrowser.st Thu Jan 29 16:04:57 1998 +0100 +++ b/ResourceSelectionBrowser.st Thu Jan 29 16:55:08 1998 +0100 @@ -19,6 +19,13 @@ category:'Interface-Advanced-Tools' ! +Object subclass:#Row + instanceVariableNames:'method icon resourceType selector' + classVariableNames:'' + poolDictionaries:'' + privateIn:ResourceSelectionBrowser +! + !ResourceSelectionBrowser class methodsFor:'documentation'! copyright @@ -92,11 +99,11 @@ #'window:' #(#WindowSpec #'name:' 'Resource Browser' - #'layout:' #(#LayoutFrame 315 0 311 0 726 0 610 0) + #'layout:' #(#LayoutFrame 460 0 343 0 871 0 642 0) #'label:' 'Resource Browser' #'min:' #(#Point 400 300) #'max:' #(#Point 1152 864) - #'bounds:' #(#Rectangle 315 311 727 611) + #'bounds:' #(#Rectangle 460 343 872 643) #'usePreferredExtent:' false ) #'component:' @@ -150,6 +157,7 @@ #'hasHorizontalScrollBar:' true #'hasVerticalScrollBar:' true #'miniScrollerHorizontal:' true + #'rowClassName:' 'ResourceSelectionBrowser::Row' #'dataList:' #listOfResources #'useIndex:' false #'has3Dsepartors:' true @@ -160,6 +168,7 @@ #( #(#DataSetColumnSpec #'width:' 20 + #'height:' 20 #'printSelector:' #'iconOn:' #'canSelect:' false ) @@ -285,10 +294,11 @@ self valueOfClassName value: clsName. self class lastSelection: clsName. self listOfResources contents: - ((Smalltalk at: clsName) + ((((Smalltalk at: clsName) class methodDictionary asOrderedCollection select: - [:m|m resources notNil and: [resourceTypes includes: m resourceType]]). + [:m| m resources notNil and: [resourceTypes includes: m resourceType]])) + collect: [:m| Row new method: m]). ] ! @@ -336,7 +346,7 @@ ]. classSelectionBlock value: classSelection. self valueOfClassName value: classSelection. - self selectionOfResource value: (self listOfResources detect: [:m| m who methodSelector == resourceMethod] ifNone: nil). + self selectionOfResource value: (self listOfResources detect: [:m| m selector == resourceMethod] ifNone: nil). self classNameInputField entryCompletionBlock: [:value| |what| @@ -382,6 +392,31 @@ ! ! +!ResourceSelectionBrowser::Row methodsFor:'accessing'! + +iconOn:aGC + + icon isNil ifTrue: [icon := method iconOn: aGC]. + ^icon +! + +method: aMethod + + method := aMethod +! + +resourceType + + resourceType isNil ifTrue: [resourceType := method resourceType]. + ^resourceType +! + +selector + + selector isNil ifTrue: [selector := method who methodSelector]. + ^selector +! ! + !ResourceSelectionBrowser class methodsFor:'documentation'! version