Status: Fixed
Owner: [email protected]
Labels: Milestone-1.3

New issue 3778 by [email protected]: cleaning cursor: and cursor
http://code.google.com/p/pharo/issues/detail?id=3778

Sensor currentCursor and currentCursor: seems misplaced.
     -> deprecate currentCursor on sensor and redirect to Cursor





I do not understand that:

Cursor>>show
     "Make the hardware's mouse cursor look like the receiver"
     Sensor currentCursor: self

InputEventSensor>>currentCursor: newCursor
     "The current cursor is maintained in class Cursor."
     Cursor currentCursor: newCursor.



We end up with spaghettis refernces between Cursor and Sensor.

Cursor>>showWhile: aBlock
"While evaluating the argument, aBlock, make the receiver be the cursor shape."
     "ar 2/2/2006: Only allow this if active process is ui process"
     | oldcursor |
     Processor activeProcess == Project uiProcess ifFalse:[^aBlock value].
     oldcursor := Sensor currentCursor.
     self show.
     ^aBlock ensure: [oldcursor show]

Sensor>>currentCursor
     "The current cursor is maintained in class Cursor."

     ^ Cursor currentCursor


Attachments:
        events.2.cs  8.2 KB


Reply via email to