[squeak-dev] Re: Calendar Chooser

David Corking lists at dcorking.com
Thu Jan 24 15:20:22 UTC 2013


Thanks for a nice new morph, Jon.

I posted 3 little SUnit tests for initialization.

http://source.squeak.org/inbox/MorphicTests-dcorking.19.mcz

I am afraid they are not well factored, which reflects my
inexperience. However, they seem to go yellow and green at the right
times with Hannes's bundle of Jon's code: MorphicExtras-hjh.106 on a
current trunk image.

Did I put them in the right category? I called it
#'MorphicTests-CalendarChooser' but you might prefer
#'MorphicTests-Extras'.

Jon wrote:
> I'm not sure why date needs to be lazy-initialized in the getter, since the instance creation
> methods #on: and #openOn: both set it to the date you pass in.

I don't think it needs to be lazy-initialized: #initialize method is
ok too. Most morph classes create a working default morph in response
to #new (for example, as sent from
TheWorldMenu>>newMorphOfClass:event: )

However, like CalendarChooserMorph, some morph classes don't like #new
, such as ProjectViewMorph. I guess it is a matter of opinion, but
since it is easy to do, I like Hannes's suggestion.

> If someone can walk me through it or point me to a page that describes how to do it, I can
> update the inbox with my current code.

IMHO we need such a page. I found section '6.3 Monticello' in 'Squeak
By Example' very helpful at getting started, as it walked me through
pushing code to an http repository just like
http://source.squeak.org/inbox . The inbox is world writeable so
doesn't need a username or password.

Have fun! David


More information about the Squeak-dev mailing list