[squeak-dev] Morphic equivalent of 'display: none'?

Thiede, Christoph Christoph.Thiede at student.hpi.uni-potsdam.de
Tue Apr 7 11:17:44 UTC 2020


However, #disableLayout is exactly what I was searching for. I do not think that we need any additional layout stuff for it. Thanks for your help, Stef! :-)


Best,

Christoph

________________________________
Von: Squeak-dev <squeak-dev-bounces at lists.squeakfoundation.org> im Auftrag von Stéphane Rollandin <lecteur at zogotounga.net>
Gesendet: Freitag, 3. April 2020 23:07:39
An: squeak-dev at lists.squeakfoundation.org
Betreff: Re: [squeak-dev] Morphic equivalent of 'display: none'?

>  > You could have such a "removed morph" temporarily #become: a
> collapsed representation (like a flat invisible morph for a list item),
> and then swap it back when you need it. I have used that pattern;
> #become: is fast.
>
>
> Hm, this does not convince me. :-) #become: replaces all references to
> the original morph. I could not access or modify any part of it during
> it is collapsed, or I would need to deal with a second variable. This
> feels like unnecessary metaprogramming.

True.

>
>  > Oh, yes, please do not add any logic to #submorphs. It is a plain
> array and a lot of things rely on this. You can implement a wrapper
> Morph with all that logic, instead.
>
> I may have expressed myself wrong - I would never override #submorphs, I
> meant to introduce a second selector, #nonSkippedSubmorphs.

Hmm.. the name in itself is a code smell :)

> So your general advice is to introduce a special morph that supports
> morph skipping? The disadvantages of this approach would the limitation
> that you cannot skip morphs in any regular morphs such as MorphicModels,
> RectangleMorphs etc. ... I would rather like to use a layout for this.

Yes, if you plan to use this skipping functionality transversaly over a
range of already existing morphs, a layout is probably the way to go.

Stef

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20200407/621a0776/attachment-0001.html>


More information about the Squeak-dev mailing list