Anyone use ClockWorks lately? (Mark Guzdial's example)

Don McLane dmclane at u.washington.edu
Sat Jul 9 03:11:49 UTC 2005


Couln't find a clue on that website (although I found some other 
interesting stuff there).

Bizarrely, I stumbled on a fix.  Just make an instance variable for the 
ClockText object.  So, I just change ClockWindow>>openOn from:

    ClockText at: ...

to:

    clockText := ClockText at: ...

I wonder if the garbage collector is somehow clobbering ClockText 
(perhaps not seeing the reference to it in the dependents collection), 
but when we keep an explicit reference to ClockText, then it's OK.

Anyway, thanks.
Don

Mark Guzdial wrote:

> Jeff Pierce came up with a fix for this, but I don't recall what it 
> was. It may be posted somewhere at http://coweb.cc.gatech.edu/cs2340.  
> Something broke between 2.8 and 3.0, as I recall.
>
> Mark
>
> On Jul 6, 2005, at 12:02 AM, Don McLane wrote:
>
>> I'm working through the ClockWorks example in Mark Guzdial's book 
>> "Squeak, Object-Oriented Design with Multimedia Applications." I'm at 
>> the point where the MVC design is finished.  Unfortunately, even if I 
>> file in his code, it doesn't seem to work.
>>
>> The dependent class (ClockText) does not seem to be getting any 
>> update calls.  A print statement assures me that the addDependent 
>> message is sent.  Another print statement tells me the Clock is ticking.
>>
>> What bothers me most is that if I step through the code with the 
>> debugger, then finally say "Proceed"--it works!
>>
>> Any suggestions would be appreciated.
>>
>> Don
>>
>>
>>
> __________
> Mark Guzdial : Georgia Tech : College of Computing/GVU
> Atlanta, GA 30332-0280
> Collaborative Software Lab, http://coweb.cc.gatech.edu/csl
> http://www.cc.gatech.edu/~mark.guzdial/
>
>




More information about the Squeak-dev mailing list