Hi
I should add that to the bug entry but I'm in the train.
balloonHelpTextForHandle: aHandle
"Answer a string providing balloon help for the
given halo handle"
| itsSelector |
aHandle eventHandler firstMouseSelector crLog.
itsSelector := aHandle eventHandler firstMouseSelector.
itsSelector == #doRecolor:with: ifTrue: [^ 'Change color'].
itsSelector == #mouseDownInDimissHandle:with:
ifTrue: [^ 'Remove from screen' translated].
#(#(#addFullHandles 'More halo handles') #(#chooseEmphasisOrAlignment 'Emphasis & alignment') #(#chooseFont 'Change font') #(#chooseNewGraphicFromHalo 'Choose a new graphic') #(#chooseStyle 'Change style') #(#doDebug:with: 'Debug') #(#doDirection:with: 'Choose forward direction') #(#doDup:with: 'Duplicate') #(#doMenu:with: 'Menu') #(#doGrab:with: 'Pick up') #(#mouseDownInCollapseHandle:with: 'Collapse') #(#mouseDownOnHelpHandle: 'Help') #(#prepareToTrackCenterOfRotation:with: 'Move object or set center of rotation') #(#startDrag:with: 'Move') #(#startGrow:with: 'Change size') #(#startRot:with: 'Rotate') #(#startScale:with: 'Change scale')#(#trackCenterOfRotation:with: 'Set center of rotation') )
do: [:pair | itsSelector == pair first
ifTrue: [^ pair last]].
^ 'unknown halo handle'translated
in 1.4
mouseDownInCollapseHandle:with:
doDebug:with:
mouseDownInDimissHandle:with:
doMenu:with:
doGrab:with:
startDrag:with:
doDup:with:
startGrow:with:
doRecolor:with:
in 20
#endInteraction
#endInteraction
#endInteraction
#endInteraction
#endInteraction
#endInteraction
#endInteraction
#endInteraction
#endInteraction
so clearly it does not work�
Now the four methods using endInteration between 20 and 14 are the same� so still looking to understand what changes.
� some time later
MorphicEventHandler>>firstMouseSelector
is a new method not present in 1.4
MorphicEventHandler>>firstMouseSelector
"Answer the selector corresponding to the first mouse-handling selector fielded. Created in support of providing balloon-help for halo handles, triggered by the selector handled"
self flag: #hack. "this has to be changed probably, nobody should depend on the first selector"
subscriptions keysAndValuesDo: [ :eventKind :subscription |
(#(
mouseDown
mouseStillDown
mouseUp
mouseMove
mouseEnter
mouseLeave
mouseEnterDragging
mouseLeaveDragging
doubleClick ) includes: eventKind) ifTrue: [ ^subscription anyOne selector ].
].
^nil
aHandle eventHandler returns a MorphicEventHandler.
Now I do not understand the logic of this code :(
I suspect that the MorphicEventHandler is not well initialized because there are only two eventKind
registered mouseUp and mouseDown.
Now I have no clue how to use the Morphic Event Handler
Apparently it is defined in
Morph>>on: eventName send: selector to: recipient
self eventHandler ifNil: [self eventHandler: MorphicEventHandler new].
self eventHandler on: eventName send: selector to: recipient
Now I tried to put a break point and the system died on me of course
Stef