changing the appearance of a method when dragging it to recategorize it in Pharo 5

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

changing the appearance of a method when dragging it to recategorize it in Pharo 5

Paul DeBruicker
When dragging a method the method class name and selector name are displayed and centered on the mouse pointer.  This prevents me from seeing the category name I'm attempting to drag the method into.  

I also have been unable to get the halos for the transient morph and see where to change it myself.  


Does anyone know where the code is that chooses to center that morph on the mouse pointer rather than stick it on a corner?


Thanks


Paul
Reply | Threaded
Open this post in threaded view
|

Re: changing the appearance of a method when dragging it to recategorize it in Pharo 5

Nicolai Hess-3-2


2016-07-14 22:03 GMT+02:00 PAUL DEBRUICKER <[hidden email]>:
When dragging a method the method class name and selector name are displayed and centered on the mouse pointer.  This prevents me from seeing the category name I'm attempting to drag the method into.

I also have been unable to get the halos for the transient morph and see where to change it myself.


Does anyone know where the code is that chooses to center that morph on the mouse pointer rather than stick it on a corner?


Thanks

There is already a bug report for this:

18405 drag and drop difficult to use
 


Paul

Reply | Threaded
Open this post in threaded view
|

Re: changing the appearance of a method when dragging it to recategorize it in Pharo 5

Paul DeBruicker
Oh great. And it has this solution I can start using today:


FTTableMorph>##startDrag: event
        | passengers transferMorph |

        event hand hasSubmorphs ifTrue: [^ self].
        self dragEnabled ifFalse: [^ self].
        "Here I ensure at least one element is selected "
        event hand anyButtonPressed ifFalse: [ ^self ].
        self hasSelection ifFalse: [ ^ self ].
                       
        passengers := self selectedRowIndexes collect: [ :each | self dataSource passengerAt: each ].
        transferMorph := self dataSource transferFor: passengers from: self.
        transferMorph align: transferMorph draggedMorph bottomLeft with: event position.
        transferMorph dragTransferType: self dataSource dragTransferType.
       
        event hand grabMorph: transferMorph


Thanks Nicolai


Nicolai Hess-3-2 wrote
2016-07-14 22:03 GMT+02:00 PAUL DEBRUICKER <[hidden email]>:

> When dragging a method the method class name and selector name are
> displayed and centered on the mouse pointer.  This prevents me from seeing
> the category name I'm attempting to drag the method into.
>
> I also have been unable to get the halos for the transient morph and see
> where to change it myself.
>
>
> Does anyone know where the code is that chooses to center that morph on
> the mouse pointer rather than stick it on a corner?
>
>
> Thanks
>

There is already a bug report for this:

18405
<https://pharo.fogbugz.com/f/cases/18405/drag-and-drop-difficult-to-use>
drag and drop difficult to use


>
>
> Paul
>