[Seaside] Re: SeaChart

Philippe Marschall philippe.marschall at gmail.com
Tue Mar 7 17:53:32 UTC 2006

> I'm using seaside2.6a3-lr.22
> scriptaculous-lr.30
> ...

Oh freeborn, please not again this bug. This is a very strange bug
Squeak. It seems to exist only in certain 3.8 images while it's absent
for 3.7 and other 3.8.
Please post any difference.

Excat Squeak version: 3.8-6665

	^ ((self red * 255) asInteger printPaddedWith: $0 to: 2 base: 16) ,
	  ((self green * 255) asInteger printPaddedWith: $0 to: 2 base: 16) ,
	  ((self blue * 255) asInteger printPaddedWith: $0 to: 2 base: 16).

Integer>>#printPaddedWith: aCharacter to: anInteger base: aRadix
	"Answer the string containing the ASCII representation of the receiver
	padded on the left with aCharacter to be at least anInteger characters."
	| aStream padding digits |
	"2000/03/04  Harmon R. Added Date and Time support"
	aStream := WriteStream on: (String new: 10).
		printOn: aStream
		base: aRadix
		showRadix: false.
	digits := aStream contents.
	padding := anInteger - digits size.
	padding > 0 ifFalse: [^ digits].
	^ ((String new: padding) atAllPut: aCharacter;
	 yourself) , digits

Integer>>#printOn: outputStream base: baseInteger showRadix: flagBoolean
	"Write a sequence of characters that describes the receiver in radix
	baseInteger with optional radix specifier.
	The result is undefined if baseInteger less than 2 or greater than 36."
	| tempString startPos |
	"2000/03/04  Harmon R. Added ANSI <integer> protocol"

	tempString := self printStringRadix: baseInteger.
	(baseInteger ~= 10) ifTrue: [tempString := baseInteger asString, $r
	flagBoolean ifTrue: [^ outputStream nextPutAll: tempString].
	startPos := (tempString indexOf: $r ifAbsent: [self error: 'radix
indicator not found.'])
				+ 1.
	self negative ifTrue: [outputStream nextPut: $-].
	outputStream nextPutAll: (tempString copyFrom: startPos to: tempString size)


More information about the Seaside mailing list