The Trunk: Tools-nice.135.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

The Trunk: Tools-nice.135.mcz

commits-2
Nicolas Cellier uploaded a new version of Tools to project The Trunk:
http://source.squeak.org/trunk/Tools-nice.135.mcz

==================== Summary ====================

Name: Tools-nice.135
Author: nice
Time: 19 October 2009, 8:34:31 am
UUID: 97767b22-8fea-2747-9ca6-8ece596fcb49
Ancestors: Tools-ul.134

Correct two typos in Browser >> #findMethod

=============== Diff against Tools-ul.134 ===============

Item was changed:
  ----- Method: Browser>>findMethod (in category 'class functions') -----
  findMethod
  "Pop up a list of the current class's methods, and select the one chosen by the user"
 
  | aClass selectors reply cat messageCatIndex messageIndex |
  self classListIndex = 0 ifTrue: [^ self].
  self okToChange ifFalse: [^ self].
  aClass := self selectedClassOrMetaClass.
  selectors := aClass selectors asSortedArray.
  selectors isEmpty ifTrue: [self inform: aClass name, ' has no methods.'. ^ self].
  reply := UIManager default
  chooseFrom: (Array with: 'Enter Wildcard'), selectors
  values: (Array with: 'Enter Wildcard'), selectors
  lines: #(1).
  reply == nil ifTrue: [^ self].
+ reply = 'Enter Wildcard'
- reply = 'EnterWildcard'
  ifTrue: [
  reply := UIManager default request: 'Enter partial method name:'.
  (reply isNil or: [reply isEmpty])
  ifTrue: [^self].
  (reply includes: $*)
  ifFalse: [reply := '*', reply, '*'].
  selectors := selectors select: [:each | reply match: each].
  selectors isEmpty ifTrue: [self inform: aClass name, ' has no matching methods.'. ^ self].
  reply := selectors size = 1
  ifTrue: [selectors first]
  ifFalse: [
  UIManager default
  chooseFrom: selectors
+ values: selectors].
- values selectors].
  reply == nil ifTrue: [^ self]].
 
  cat := aClass whichCategoryIncludesSelector: reply.
  messageCatIndex := self messageCategoryList indexOf: cat.
  self messageCategoryListIndex: messageCatIndex.
  messageIndex := (self messageList indexOf: reply).
  self messageListIndex: messageIndex!