[BUG]UndefinedObject(Object)>>doesNotUnderstand: #<

goran.krampe at bluefish.se goran.krampe at bluefish.se
Wed Feb 23 11:19:17 UTC 2005


Hi!

Eh, I am with Ned on all he says. :) It all seems awkward to say the
least.

And also - we chatted (bitmonki, Cees and me and others) on IRC about
this and couldn't figure it out (/dev/urandom had the right rights and
was readable, yaddayadda - everything was fine on the OS level).

But btw, shouldn't we use #ensure: or something like this:

makeUnixSeed
	| strm answer |
	[strm := FileStream readOnlyFileNamed: '/dev/urandom'.
	[strm binary; converter: Latin1TextConverter new.
	answer := Integer
		byte1: strm next
		byte2: strm next
		byte3: strm next
		byte4: strm next]
			ensure: [strm close]]
				on: FileStreamException do: [answer := nil].
	^answer

(not compiled or tested)

regards, Göran



More information about the Squeak-dev mailing list