IF you attempt to save a method that has an unknown symbol (my usual spelling mistake!) AND you have the -all- message category selected then the method text is whipped out from under you.
It appears to be a problem in Browser>messageCategoryListIndex:, or at least the usage of it within Browser>contents:notifying:. There is an attempt to correct for the 'wrong' category being selected and the code ends up clearing the code view. There is also a trivial bug in Browser>selectUnclassifiedCategory, where 0 is hardcoded as the index of the 'no messages' category; it seems more reasonable for it to be 1, since it follows 'all' which is an imaginary entry.
As for a fix, I imagine changing the contents:notifying: code to send some other message that changes the category that is used to compile under but does not affect the browser display should work. Since both of the methods (#selectOriginalCategoryForCurrentMethod & #selectUnclassifiedCategory) are only used in contents:notifying: this ought to be reasonably safe.
It seems to be ok if we change #selectMessageCategoryNamed: to avoid the display updating and change #selectUnclassifiedCategory to use it with the name of the category rather than the index.
Possible fix changeset enclosed.
tim
Tim,
This problem was reported by Oshima a couple of months ago. Carl and Chris fixed the bug and a few other related glitches associated with the "--all--" feature last month, and the resulting updates have long since been in our internal update stream (#1217 and #1218), but due to various distractions we've been neglecting to push updates over to the external update server for several weeks -- a situation that I'm sure will be rectified soon.
-- Scott
At 7:26 PM -0700 6/24/99, Tim Rowledge wrote:
IF you attempt to save a method that has an unknown symbol (my usual spelling mistake!) AND you have the -all- message category selected then the method text is whipped out from under you....
squeak-dev@lists.squeakfoundation.org