[BUG][FIX] AlignmentMorph
Matej Kosik
kosik at decef.elf.stuba.sk
Thu Jan 29 12:47:39 UTC 2004
I was recently working on a subclass of the AlignmentMorph.
I wanted the new morph to be created with #new class method
(as it is usual for most of the morphs). I have, however, realized that
this is not possible because when I in my subclass's #new method calls the
superclass's method #newRow or #newColumn, this results in infinite loop
since the #newRow and #newColumn method refer to the #new method.
Those methods should not do:
self new
but
super new
The attached little changeset fixes that problem.
--
Matej Kosik <http://altair.dcs.elf.stuba.sk/wiki/Kosik/Main>
-------------- next part --------------
'From Squeak3.6 of ''6 October 2003'' [latest update: #5429] on 29 January 2004 at 1:51:22 pm'!
!AlignmentMorph class methodsFor: 'instance creation' stamp: 'mk 1/29/2004 13:48'!
newColumn
^ super new
listDirection: #topToBottom;
hResizing: #spaceFill;
extent: 1 at 1;
vResizing: #spaceFill
! !
!AlignmentMorph class methodsFor: 'instance creation' stamp: 'mk 1/29/2004 13:48'!
newRow
^ super new
listDirection: #leftToRight;
hResizing: #spaceFill;
vResizing: #spaceFill;
extent: 1 at 1;
borderWidth: 0
! !
More information about the Squeak-dev
mailing list
|