[BUG] Accept method resets method pane contents on a compile error

Ken Causey ken at kencausey.com
Tue Feb 3 15:11:42 UTC 2004


A couple of points.

1.  If you install the Refactoring Browser you do not see this
behavior.  I suspect this is one reason this has not been noticed.

2.  This is one way to create a new method but I suspect not the way
that most people do it.  If you instead select a category so that you
have a method template and then replace the code in that template then
you do not see this behavior.  I would argue that this is the more
correct usage.  The way you outline could be described as an attempt to
redefine an existing method and is I suspect what the Browser is
considering it.  I agree that that is not really correct.

At any rate I think you can see that there are two solutions to your
problem until this is fixed.  One is installing a piece of software I
personally would recommend installing anyway.  The other is a slight
change in behavior.

Ken

On Mon, 2004-02-02 at 14:40, ajr wrote:
> Problem:
> 
> When pressing alt-s to save a method with a compile error, the current
> contents of the method pane may be reverted to the last saved contents.
> This problem is new in 3.7.
> 
> This can be reproduced in a 3.7alpha #5657 image as follows:
> 
> 1) alt-b (brings up a system browser) 
> 2) left-click on Kernel-Objects
> 3) left-click on Boolean
> 4) left-click on method &
> 5) left-click in method pane
> 6) alt-a (highlights method pane contents)
> 7) press a
> 8) press space
> 9) press b   (ie, method 'a' with undeclared var 'b') 
> 10) press alt-s
> 
> Now the the 'unknown variable' dialog is displayed and the method pane
> contents reverts to the #& method. It should still show 'a b'. Pressing
> cancel does not recover the changes. If the method is larger and the error
> cannot be corrected via the dialog, significant work can be lost.
> 
> Note that restarting this procedure again from step 6 does NOT reproduce
> the error.
> 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20040203/fa60b9eb/attachment.pgp


More information about the Squeak-dev mailing list