[Newbies] Aida 6.8 on Squeak 4.6

David T. Lewis lewis at mail.msen.com
Sat Dec 19 22:42:31 UTC 2020


On Sat, Dec 19, 2020 at 09:26:38PM +0100, stes at PANDORA.BE wrote:
> 
> 
> I've found a solution or workaround to make Aida 6.8 final2 run on Squeak 4.6.
> 
> It is working fine on Squeak 5.0 but was throwing a 'doesNotUnderstand',
> during initialization, in the Squeak 4.6 case.
> 
> I think that it is actually very easy to fix the problem.
> 
> The problem is in the category Swazoo for DateAndTime from the Swazoo 2.4.
> 
> If - after loading Swazoo 2.4 - I open the implementation of
> 
> fromMilliseconds: anInteger
> 	| ms uSec offset |
> 	offset := self localOffsetSeconds.
> 	ms := anInteger - (self epochOffset * 1000).
> 	uSec := ms * 1000.
> 	^ self utcMicroseconds: uSec offset: offset
> 
> 
> it can be seen that the above is using #'localOffsetSeconds'
> which I think is Squeak 5/Squeak 6 specific.
> 
> This is related I think to a "change in the Squeak Epoch" between 4 and 5.
> 
> Anyway this is not such a difficult thing to change, because when
> I replace the above by:
> 
> fromMilliseconds: anInteger
> 	^ self fromSeconds:(anInteger/1000)
> 
> 
> I'm not sure the above is correct.
> 

Yes, your solution is correct, and I would prefer your implementation
over the method quoted above for any version of Squeak.

On older versions of Squeak, the result might not have time zone offset
that you expect, so check for that. But the magnitude will be correct
in any case.

Dave



> But it helps because with the above implementation, I can load Aida 6.8final2,
> just fine in Squeak 4.6 !
> 
> This is thanks to the fact that I use with the above fromSeconds:
> the implementation of Squeak 4.6 which is totally different than in Squeak 5.
> 
> The nice thing is that the Aida 6.8 server starts fine in Squeak 4.6,
> and when I connect to http://localhost:8888 the Aida 6.8 pages load OK.
> 
> So it seems very easy to fix, although I'm not sure that my simple
> implementation of "fromMilliseconds:" as above, is correct.
> 
> But it helps to run Aida 6.8 on both Squeak 5 and Squeak 4.6.
> 
> David Stes
> 


More information about the Beginners mailing list