ResourceSelectionBrowser.st
changeset 1986 5cb77205ce00
parent 1978 c4334704dc58
child 2026 df5b0b3902de
--- a/ResourceSelectionBrowser.st	Wed Feb 15 17:49:58 2006 +0100
+++ b/ResourceSelectionBrowser.st	Wed Feb 15 18:24:02 2006 +0100
@@ -357,7 +357,7 @@
                           name: 'classNameInputField'
                           layout: (LayoutFrame 2 0.0 -22 1 -1 1.0 0 1)
                           tabable: true
-                          model: valueOfClassName
+                          model: classNameHolder
                           acceptOnLeave: true
                           acceptOnLostFocus: true
                           acceptOnPointerLeave: true
@@ -392,7 +392,7 @@
                           name: 'selectorInputField'
                           layout: (LayoutFrame 2 0.0 -22 1 -2 1.0 0 1)
                           tabable: true
-                          model: valueOfResourceSelector
+                          model: resourceSelectorHolder
                           acceptOnLeave: true
                           acceptOnLostFocus: true
                           acceptOnPointerLeave: true
@@ -492,6 +492,18 @@
 
 !ResourceSelectionBrowser methodsFor:'aspects'!
 
+classNameHolder
+    "returns the value holder for the name of the class"
+
+    |holder|
+
+    (holder := builder bindingAt:#valueOfClassName) isNil ifTrue:[
+        builder aspectAt:#valueOfClassName put:(holder :=  '' asValue).
+        holder onChangeEvaluate:[self classSelectionUpdate:holder value].
+    ].
+    ^ holder
+!
+
 helpEnabled
     "returns whether there is a documentation file"
 
@@ -515,6 +527,16 @@
     ^ holder
 !
 
+resourceSelectorHolder
+    "returns the value holder for the name of the selector"
+
+    |holder|
+    (holder := builder bindingAt:#valueOfResourceSelector) isNil ifTrue:[
+        builder aspectAt:#valueOfResourceSelector put:(holder :=  '' asValue).
+    ].
+    ^ holder
+!
+
 rootOfClassCategories
     "returns the value holder for the root of the class tree list"
 
@@ -586,7 +608,7 @@
                  ].
                  comp root:newRoot.
                  comp raise. 
-                 classSelectionBlock value: self valueOfClassName value
+                 classSelectionBlock value: self classNameHolder value
             ]
     ].
     ^ holder
@@ -605,22 +627,15 @@
 valueOfClassName
     "returns the value holder for the name of the class"
 
-    |holder|                   
-    (holder := builder bindingAt:#valueOfClassName) isNil ifTrue:[
-        builder aspectAt:#valueOfClassName put:(holder :=  '' asValue).
-        holder onChangeEvaluate:[self classSelectionUpdate:holder value].
-    ].
-    ^ holder
+    self obsoleteMethodWarning:'stupid name - use #classNameHolder'.
+    ^ self classNameHolder
 !
 
 valueOfResourceSelector
     "returns the value holder for the name of the selector"
 
-    |holder|
-    (holder := builder bindingAt:#valueOfResourceSelector) isNil ifTrue:[
-	builder aspectAt:#valueOfResourceSelector put:(holder :=  '' asValue).
-    ].
-    ^ holder
+    self obsoleteMethodWarning:'stupid name - use #resourceSelectorHolder'.
+    ^ self resourceSelectorHolder
 ! !
 
 !ResourceSelectionBrowser methodsFor:'callbacks-class list'!
@@ -781,7 +796,7 @@
             ].
         ].
     ].
-    self valueOfClassName value: clsPattern.
+    self classNameHolder value: clsPattern.
     self updateResourceMethodList.
 !
 
@@ -796,7 +811,7 @@
     "after a click on a resource method, set its selector into the field"
 
     self selectionOfResourceMethod value notNil
-	ifTrue: [self valueOfResourceSelector value: self selectionOfResourceMethod value selector]
+        ifTrue: [self resourceSelectorHolder value: self selectionOfResourceMethod value selector]
 !
 
 updateResourceMethodList
@@ -824,7 +839,7 @@
 
         resourceTypes isNil ifTrue: [resourceTypes := Method resourceTypes].
 
-        self valueOfClassName value: className.
+        self classNameHolder value: className.
         self class lastSelection: className.
 
         newContents := class class methodDictionary asOrderedCollection 
@@ -862,12 +877,12 @@
             ]
         ]
     ].            
-    self valueOfResourceSelector value:(aSelector ? '').
+    self resourceSelectorHolder value:(aSelector ? '').
     self open.
 
     (selectedClass := self selectionOfClassHierarchy value) isNil ifTrue:[
         (selectedClass := self selectionOfClassCategories value) isNil ifTrue:[
-            (enteredClassName := self valueOfClassName value) isNil ifTrue:[
+            (enteredClassName := self classNameHolder value) isNil ifTrue:[
                 accept value ifTrue:[
                     self warn:'No valid class selected/entered'.
                 ].
@@ -882,7 +897,7 @@
     ].
     cls := Smalltalk classNamed:className.
     (cls isClass and:[accept value]) ifTrue:[            
-        ^ Method::MethodWhoInfo class:cls selector:(self valueOfResourceSelector value)
+        ^ Method::MethodWhoInfo class:cls selector:(self resourceSelectorHolder value)
     ].
 
     accept value ifTrue:[
@@ -910,7 +925,7 @@
 "/        ifTrue: [classSelection :=  self treeViewContents].
 
     classSelectionBlock := [:clsPattern | self classSelectionUpdate:clsPattern].
-    self valueOfClassName value:classSelection.  
+    self classNameHolder value:classSelection.  
 
     (classNameInputField := builder componentAt: #classNameInputField) 
         entryCompletionBlock:
@@ -931,7 +946,7 @@
 "/                classSelectionBlock value: classNameInputField contents
             ].
 
-    classSelectionBlock value: self valueOfClassName value.
+    classSelectionBlock value: self classNameHolder value.
     self updateResourceMethodList.
     self selectionOfResourceMethod value: (self listOfResourceMethods detect: [:m| m selector == resourceMethod] ifNone: nil).