A couple of bugs and a goodie - improved "Senders of"
mateoc at orbonline.net
Sat Jun 27 04:41:12 UTC 1998
The goodie enhances the "Senders of " functionality. It properly
discriminates and selects the selector (no false matches as the ones
resulting from the simple search currently used) and, if the selector is a
multiple keyword selector, it also shows a multiple selection for all the
keywords in the selector. It also allows you to iterate through the
multiple sends of the same selector in a method body (if there are any) by
simply re-selecting the same method in the list. (similar to VisualAge's
behaviour, except that in VisualAge as well as in many other tools the
selection part is also broken).
The implementation consists of:
- two new classes:
PluggableTextViewOfMany and PluggableTextControllerOfMany - that could
probably be used for other multiple-selection text activities as well
- two additional methods:
#findSelector: in StringHolder and #signalReselection in ListController
- a small hack in MessageSet class>>open:name:
- and a small change in ListController>>redButtonActivity.
Note that the change in ListController>>redButtonActivity means that
re-selecting does not deselect anymore, which might be an inconvenience if
you are used to it. But there is a bug anyway in that method (see further
It also looks like the autoDeselect feature in PluggableListView is broken
(I am not using it but I tried it with the only non-morphic sender of
#autoDeselect: (which is FileList), and it does not work).
Anyway, if anybody is interested, please let me know where and how to put
Now the bugs:
1. In ListController>>redButtonActivity
nextSelection ~~ nil & (nextSelection = oldSelection
always evaluates to true, so
[self changeModelSelection: nextSelection]
is always executed, no matter what is in the variable noSelectionMovement.
Now if we change the code to be...
noSelectionMovement ifFalse: [self changeModelSelection:
....we are using the variable but autoDeselect does not work anymore. This
is actually what I did:
noSelectionMovement ifTrue: [self signalReselection]
ifFalse: [self changeModelSelection:
2. In ParseNode>>printCommentOn:indent: there is a trailing line
comment := nil.
I don't understand what could be the reason for that, but it certainly
makes the comment nil in all the MethodNodes that you inspect. ;-)
More information about the Squeak-dev