[squeak-dev] Cuis updated to #0250
Juan Vuletich
juan at jvuletich.org
Mon Aug 3 15:26:40 UTC 2009
Hi Subbu,
K. K. Subramaniam wrote:
> On Sunday 02 Aug 2009 6:49:15 pm Juan Vuletich wrote:
>
>> Play a bit with the code. If you come up with something that works
>> better, I'd be really happy.
>>
> Attached is my first stab at it. I have refactored the three mouse event
> handlers in TextEditor. I still haven't figured out why context menu pops up
> while the mouse button is still down.
>
That's because of MouseClickState. In your code you did not disable it.
It is called from #waitForSimulatedYellow:event: .
> Subbu
>
This is my fix. Thanks for bringing up the issue!
Cheers,
Juan Vuletich
-------------- next part --------------
'From Cuis 1.0 of 31 July 2009 [latest update: #250] on 3 August 2009 at 12:23:12 pm'!
!TextEditor methodsFor: 'events' stamp: 'jmv 8/3/2009 12:19'!
mouseDown: evt
"An attempt to break up the old processRedButton code into threee phases"
| clickPoint b |
oldInterval _ self selectionInterval.
clickPoint _ evt cursorPoint.
b _ paragraph characterBlockAtPoint: clickPoint.
(paragraph clickAt: clickPoint for: model controller: self) ifTrue: [
self markBlock: b.
self pointBlock: b.
evt hand releaseKeyboardFocus: self.
^ self ].
evt shiftPressed
ifFalse: [
self closeTypeIn.
self markBlock: b.
self pointBlock: b ]! !
!TextEditor methodsFor: 'events' stamp: 'jmv 8/3/2009 12:13'!
mouseMove: evt
"Change the selection in response to mouse-down drag"
self pointBlock: (paragraph characterBlockAtPoint: (evt cursorPoint)).
self storeSelectionInParagraph! !
More information about the Squeak-dev
mailing list
|