P.S. The screen shot mentioned in the previous mail.
On 3/22/19, H. Hirzel hannes.hirzel@gmail.com wrote:
On 3/22/19, Stephan Eggermont stephan@stack.nl wrote:
Levente Uzonyi leves@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@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@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