[newbie] question about style and MonthMorph

Herbert König herbertkoenig at gmx.net
Sat Nov 12 21:49:44 UTC 2005


Hello,

I'm using a MonthMorph to select a date or a week or a month.
The selection is highlighted by sending highlight to the appropriate
button(s).

Everything is fine if I press a button. If I change the month or the
year, the MonthMorph>>month: first sends setDate:fromButton:down: to
the model. There I highlight the appropriate buttons. Then, when
returning into MonthMorph>>month: it sends initializeWeeks to itself
and only then the right buttons are displayed but not highlighted.

The obvious solutions would be to change MonthMorph>>month: by just
swapping the two lines of code or subclass MonthMorph to override
month:.

I feel uncomfortable with both solutions but even more to build
something into my model to wait with the highlighting until the
MonthMorph has changed.

On the other hand I do quite a lot of work in
setDate:fromButton:down:, query a data base, build up some display
which also doesn't feel right for a callback.

Which way to go about it?

Thanks,

Herbert                          mailto:herbertkoenig at gmx.net




More information about the Squeak-dev mailing list