[BUG](FIX] double initialization in ParagraphEditor

Boris Gaertner Boris.Gaertner at gmx.net
Fri Sep 3 17:20:26 UTC 2004


This bug report is for Squeak 3.7 gamma latest update: #5987
(both for the basic image and for the full image)

In the class protocol of ParagraphEditor we read

* in method new:

new
 "Answer a new instance of me with a null Paragraph to be edited."

 | aParagraphEditor |
 aParagraphEditor _ super new.
 " --> "  aParagraphEditor initialize.  " < -- "
 aParagraphEditor changeParagraph: '' asParagraph.
 ^aParagraphEditor

* in method newParagraph:

newParagraph: aParagraph 
 "Answer an instance of me with aParagraph as the text to be edited."

 | aParagraphEditor |
 aParagraphEditor _ super new.
 " --> " aParagraphEditor initialize.  " <-- "
 aParagraphEditor changeParagraph: aParagraph.
 ^aParagraphEditor


The statements  aParagraphEditor initialize
(labelled with comments by me) are not needed any more,
as initialization is called when   super new  is evaluated.

The attached change set is a proposal to remove the
unneeded second initialization.

This is not a serious bug, but I think it it a bug nevertheless.

Greetings,
Boris
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ParagraphEditorFix.1.cs
Type: application/octet-stream
Size: 1089 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20040903/0a2d6f85/ParagraphEditorFix.1.obj


More information about the Squeak-dev mailing list