Indeed, unfortunately, due to the way it was done all those years ago, many (Poly)morphs create sub/ancillary morphs in the initialize. If the theme is not set they will get created with the current theme, rather than the theme doing the initial creation. I suppose the submorph creation could be done in a separate method and called after initalize and theme setting, a lot more work to do that way though. Regards, Gary ----- Original Message ----- From: "Stéphane Ducasse" <stephane.ducasse@inria.fr> To: <Pharo-project@lists.gforge.inria.fr> Sent: Wednesday, April 25, 2012 12:55 PM Subject: Re: [Pharo-project] Polymorph (and a few other) changes/fixes On Apr 25, 2012, at 12:33 PM, Gary Chambers wrote:
Hi Stef,
I guess you mean to move the resizing bits.
I do not know. I was more thinking about the use of basicNew and the explicit initialize which was a kind of bad smell to me. Stef
It is explicit in ExpanderMorph because that's how the title should be in the context of an expander.
The ExpanderTitleMorph *could* be used elsewhere with different properties.
Regards, Gary
----- Original Message ----- From: "Stéphane Ducasse" <stephane.ducasse@inria.fr> To: <Pharo-project@lists.gforge.inria.fr> Sent: Wednesday, April 25, 2012 10:42 AM Subject: Re: [Pharo-project] Polymorph (and a few other) changes/fixes
Gary
I was wondering if a part of this method could be used in ExpanderTitleMorph>>initialize ?
ExpanderMorph>>defaultTitleMorph "Answer a default title morph for the receiver."
^ExpanderTitleMorph basicNew basicTheme: self theme; initialize; hResizing: #spaceFill; vResizing: #shrinkWrap; basicTheme: nil
On Apr 24, 2012, at 5:21 PM, Gary Chambers wrote:
Finally found the time to package out. Have tested a bit after fixing some conflicts. A few minor ones left for DropListMorph as it seems the wrapSelector stuff has changed (and appears broken in 2.0 too).
Attached cs and description of changes
Regards, Gary <Pharo2.0Changes.4.cs><PharoPolymorphChanges.txt>