[Vm-dev] Mantis 0007756: InputSensor>>cursorPoint: uses primitive 91 (primitiveTestDisplayDepth) (was: two small bugs (vm related))

David T. Lewis lewis at mail.msen.com
Sun Sep 13 23:37:56 UTC 2015


On Sun, Sep 13, 2015 at 10:23:42PM +0200, Nicolai Hess wrote:
>  
> http://bugs.squeak.org/view.php?id=7756
> 0007756: InputSensor>>cursorPoint: uses primitive 91
> (primitiveTestDisplayDepth)
> 
> Either we remove the code from InputSensor, or we add another
> new primitive for setting the mouse cursor.
> (Maybe we don't need this functionality or this is already possible with
> the hostwindow plugin?)

The primitive number assignments are set in #initializePrimitiveTable
in the VM code (VMMaker package). This shows:

		(91 primitiveTestDisplayDepth)			"Blue Book: primitiveCursorLocPut"

So this tells me that primitive 91 was originally used for a primitive
that set the cursor location, but that this primitive was abandoned a long
time ago, and eventually someone decide to use 91 for a different purpose
(testing display depth).

That means that you are right in thinking that the InputSensor code is
obsolete and should be removed or fixed. But I think that InputSensor itself
has been replaced by EventSensor, and probably has no function in a modern
Squeak image. It is referenced by class Controller (MVC) but the Sensor in
an MVC project is an EventSensor, so I suspect that it may now be possible
to remove InputSensor entirely.

I have not actually tried this yet, but the test would be to remove InputSensor
and all of the references to it, then see if MVC still works.

Dave



More information about the Vm-dev mailing list