[Pharo-project] A contorted way of making things work :)
StringMorph>>boundsForBalloon "Some morphs have bounds that are way too big. This is a contorted way of making things work okay in PluggableListMorphs, whose list elements historically have huge widths" | ownerOwner | ^ ((owner notNil and: [(ownerOwner := owner owner) notNil]) and: [ownerOwner isKindOf: PluggableListMorph]) ifTrue: [self boundsInWorld intersect: ownerOwner boundsInWorld] ifFalse: [super boundsForBalloon] -- Best regards, Igor Stasenko.
What I love is the impact of not having cool invariant. Imagine a world where every morph would have a owner, suddenly the logic of morphic would be cut by two :) Stef On Dec 22, 2012, at 2:57 AM, Igor Stasenko wrote:
StringMorph>>boundsForBalloon "Some morphs have bounds that are way too big. This is a contorted way of making things work okay in PluggableListMorphs, whose list elements historically have huge widths"
| ownerOwner | ^ ((owner notNil and: [(ownerOwner := owner owner) notNil]) and: [ownerOwner isKindOf: PluggableListMorph]) ifTrue: [self boundsInWorld intersect: ownerOwner boundsInWorld] ifFalse: [super boundsForBalloon]
-- Best regards, Igor Stasenko.
On 22 December 2012 14:34, Stéphane Ducasse <stephane.ducasse@inria.fr> wrote:
What I love is the impact of not having cool invariant. Imagine a world where every morph would have a owner, suddenly the logic of morphic would be cut by two :)
Well, for some morphs, nil is the only owner which they deserve to have :)
Stef
-- Best regards, Igor Stasenko.
On Dec 22, 2012, at 2:44 PM, Igor Stasenko wrote:
On 22 December 2012 14:34, Stéphane Ducasse <stephane.ducasse@inria.fr> wrote:
What I love is the impact of not having cool invariant. Imagine a world where every morph would have a owner, suddenly the logic of morphic would be cut by two :)
Well, for some morphs, nil is the only owner which they deserve to have :)
lol :) Indeed :) Stef
participants (2)
-
Igor Stasenko -
Stéphane Ducasse