[squeak-dev] The Inbox: Morphic-sjce.1465.mcz
H. Hirzel
hannes.hirzel at gmail.com
Fri Mar 22 11:03:54 UTC 2019
On 3/22/19, Stephan Eggermont <stephan at stack.nl> wrote:
> Levente Uzonyi <leves at caesar.elte.hu> wrote:
>> Do you have a reproducible case fixed by this commit?
> To me it seems to be a workaround for a mistake: a morph's name is a
> Text instead of a String.
>
> ‘Text’ asMorph openInWindowLabeled: ‘Text’ asText
> You prefer additions to Text?
>
> Stephan
Hello Stephan
If I execute
'My text' asMorph openInWindowLabeled: 'My window' asText
in Squeak 5.3alpha 68021 I get a tiny window (see screen shot). If I
want to grab it I get an error message. So window labels can not be
texts.
'My text' asMorph openInWindowLabeled: 'My window' asString
does not exhibit this behaviour. However the window is black. So the
coding idiom to open a Morph in a window with a particular label must
be different.
http://wiki.squeak.org/squeak/6371
http://wiki.squeak.org/squeak/6347
have notes with some relevance for this issue.
For example #openInWindow: works fine. In class Morph #openInWindow:
is implemented.
example:
p := PasteUpMorph new.
p extent: 600 at 1000.
p layoutPolicy: TableLayout new.
p listDirection: #leftToRight.
p wrapCentering: #topLeft.
p wrapDirection: #topToBottom.
p layoutPolicy: TableLayout new;
listDirection: #topToBottom;
color: Color white.
sp := ScrollPane new extent: 600 at 500.
sp scroller addMorph: p.
Project allNames asSortedCollection do:
[ :aName | p addMorph:
(ProjectViewMorph on: (Project named: aName)) ].
p color: Color green.
sp openInWindow: 'Projects'.
sp setScrollDeltas.
As Levente writes, the test case needs to be specified in more
details. Different patches might be needed.
--Hannes
More information about the Squeak-dev
mailing list
|