Enh: CHB Find Class retry should use last entered text...

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

Enh: CHB Find Class retry should use last entered text...

Christopher J. Demers
If one opens a CHB, and tries to find a class the find dialog will use text
from the clipboard.  If that class can not be found the user is asked if
they want to try again.  When the find dialog opens again it will still use
text from the clipboard even is the user typed a class name before.  I think
that when the user retries the find it should start with the text they tried
the first time, allowing them to make changes to it before trying again.  I
made two small changes to the method bellow to support that.

============
SmalltalkSystem<<findClassIn: aBrowserEnvironment
 | class className |
 class := nil.
 "cdemers 5/23/2005 Enhanced to use previous text on retry."
 className := ''.
 [
 [className := self promptForClassName: className.
 className isNil ifTrue: [^nil].
 class := self findMatchingClass: className in: aBrowserEnvironment.
 class isNil]
   whileTrue]
   on: OperationAborted
   do: [:ex | ].
 ^class
============

Chris