Yes, #labelled: does a basic new, sets label then an initialize. #initialize for a StandardWindow sets a default title and so overwrites the previous specified label.
IMHO this is an abuse of #intialize in the #labelled: method! Probably done for "performance" (though likely undetectable). I suggest rewriting #labelled: to ^self new setLabel: labelString Regards, Gary ----- Original Message ----- From: "Torsten Bergmann" <asta...@gmx.de> To: <pharo-project@lists.gforge.inria.fr> Sent: Thursday, February 18, 2010 12:41 AM Subject: [Pharo-project] Polymorph: Window with title > Hi Gary, > > there is a difference here, first one displays the title > while the second one not: > > window := SystemWindow labelled: 'Foo'. > window openInWorld > > vs. > > window := StandardWindow labelled: 'Foo'. > window openInWorld > > An explicit #title: call is required here. > > Bye > T. > -- > Sicherer, schneller und einfacher. Die aktuellen Internet-Browser - > jetzt kostenlos herunterladen! http://portal.gmx.net/de/go/atbrowser > > _______________________________________________ > Pharo-project mailing list > Pharo-project@lists.gforge.inria.fr > http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project _______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project