Behavior>>new ^ self basicNew initialize [was: Shout Workspace by Default]
On Mon, 11 Sep 2006 02:15:39 +0200, Zulq Alam wrote:
> Oh, and isn't there something wrong with:
> ^ self basicNew initialize
> Shouldn't it have a yourself? Otherwise it relies on initialize
> answering with self and it would seem often the implicit self.
Try this: YourClass>>initialize ^nil
> Perhaps this is intended for some reason?
Yes, Behavior doesn't want to take over the responsibility for what is
returned by your #initialize method, so it passes garbage-in garbage-out.
If in need, you can always ask for (YourClass basicNew initialize;