Issue 3778 in pharo: cleaning cursor: and cursor

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
11 messages Options
Reply | Threaded
Open this post in threaded view
|

Issue 3778 in pharo: cleaning cursor: and cursor

pharo
Status: Fixed
Owner: [hidden email]
Labels: Milestone-1.3

New issue 3778 by [hidden email]: 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 | Threaded
Open this post in threaded view
|

Re: Issue 3778 in pharo: cleaning cursor: and cursor

pharo

Comment #1 on issue 3778 by [hidden email]: cleaning cursor: and  
cursor
http://code.google.com/p/pharo/issues/detail?id=3778

Please review this fix!
I do not like to integrate my own changes


Reply | Threaded
Open this post in threaded view
|

Re: Issue 3778 in pharo: cleaning cursor: and cursor

pharo

Comment #2 on issue 3778 by [hidden email]: cleaning cursor: and  
cursor
http://code.google.com/p/pharo/issues/detail?id=3778

Modified a bit the changeset, no more need to compare Cursor currentCursor  
== myCursor,beacuse i've added Cursor>>isCurrent; also replaced the usage  
of #currentCursor:  by "myCursor show".

Attachments:
        events.2.cs  8.2 KB


Reply | Threaded
Open this post in threaded view
|

Re: Issue 3778 in pharo: cleaning cursor: and cursor

pharo

Comment #3 on issue 3778 by [hidden email]: cleaning cursor: and  
cursor
http://code.google.com/p/pharo/issues/detail?id=3778

Thanks! this is great to do pair programming with you like that :)


Reply | Threaded
Open this post in threaded view
|

Re: Issue 3778 in pharo: cleaning cursor: and cursor

pharo

Comment #4 on issue 3778 by [hidden email]: cleaning cursor: and  
cursor
http://code.google.com/p/pharo/issues/detail?id=3778

oops I cannot load your changeset


Reply | Threaded
Open this post in threaded view
|

Re: Issue 3778 in pharo: cleaning cursor: and cursor

pharo

Comment #5 on issue 3778 by [hidden email]: cleaning cursor: and  
cursor
http://code.google.com/p/pharo/issues/detail?id=3778

Nor mine :(
How did you load it.


Reply | Threaded
Open this post in threaded view
|

Re: Issue 3778 in pharo: cleaning cursor: and cursor

pharo

Comment #6 on issue 3778 by [hidden email]: cleaning cursor: and  
cursor
http://code.google.com/p/pharo/issues/detail?id=3778

May be we should split the code in batch because probably it is changing  
something that is currently been executed.


Reply | Threaded
Open this post in threaded view
|

Re: Issue 3778 in pharo: cleaning cursor: and cursor

pharo

Comment #7 on issue 3778 by [hidden email]: cleaning cursor: and  
cursor
http://code.google.com/p/pharo/issues/detail?id=3778

Ok, i will go through the changset and load one by one.

Until i find the probable conflicting change.

pd: Pair programming like this has also been fun for me!


Reply | Threaded
Open this post in threaded view
|

Re: Issue 3778 in pharo: cleaning cursor: and cursor

pharo

Comment #8 on issue 3778 by [hidden email]: cleaning cursor: and  
cursor
http://code.google.com/p/pharo/issues/detail?id=3778

Done, seems that the deprecations methods were hanging the image when  
loaded in a certain order.
First: CursorChanges.3.cs
Second: CurrentCursorInputEventDeprecation.1.cs

Attachments:
        CursorChanges.3.cs  6.4 KB
        CurrentCursorInputEventDeprecation.1.cs  802 bytes


Reply | Threaded
Open this post in threaded view
|

Re: Issue 3778 in pharo: cleaning cursor: and cursor

pharo

Comment #9 on issue 3778 by [hidden email]: cleaning cursor: and  
cursor
http://code.google.com/p/pharo/issues/detail?id=3778

Super!
Yes this is fun.



Reply | Threaded
Open this post in threaded view
|

Re: Issue 3778 in pharo: cleaning cursor: and cursor

pharo
Updates:
        Status: Closed

Comment #10 on issue 3778 by [hidden email]: cleaning cursor: and  
cursor
http://code.google.com/p/pharo/issues/detail?id=3778

in 13074