Question about <primitive:127>

Bob Arning arning at
Thu Dec 7 20:22:36 UTC 2000

On Thu, 07 Dec 2000 20:47:20 +0100 Karl Ramberg <karl.ramberg at> wrote:
>I wanted to see if I could speed up drawing a form 
>by sending it right to the display primitive, so I 
>copied this method from DisplayScreen to Form:
>primShowRectLeft: l right: r top: t bottom: b
>	"Copy the given rectangular section of the Display to to the screen. 
>This primitive is not implemented on all platforms. 
>If this fails, retry integer coordinates."
>	<primitive: 127> 
>But nothing happens. Now I wonder why ?


Primitive 127 assumes the Display (actually, the 15th element of the special object array) as the source for the bits, regardless of the actual receiver of the message, so adding the method to Form had no effect. If you want to do this, at your own risk, you can use something like:

	(f _ Form extent: 300 at 300 depth: 32) fillColor: Color red.
	Smalltalk specialObjectsArray at: 15 put: f.
	Display forceToScreen: f boundingBox.
	Smalltalk specialObjectsArray at: 15 put: Display.	


More information about the Squeak-dev mailing list