Bug when doing Paste in Find & Replace dialog

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

Bug when doing Paste in Find & Replace dialog

Juan Pablo Sandoval
Hello,

I trying to fix the
Issue 6622: Bug when doing Paste in Find & Replace dialog

I think that the problem is in the following code.
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
EditorFindReplaceDialogWindow>>newReplaceTextEntryMorph
| entryCompletion pt |
entryCompletion := EntryCompletion new
dataSourceBlock: [:currText | self prevReplacements ];
filterBlock: [:currApplicant :currText | currText size = 0
or: [currApplicant asUppercase includesSubstring: currText asString asUppercase]].

pt := (self
newAutoAcceptTextEntryFor: self
get: #replaceText
set: #replaceText:
class: String
getEnabled: nil
help: 'Enter the replacement text' translated
entryCompletion: entryCompletion)
acceptOnCR: true;
autoAccept: true ;
crAction: [:t | self replace];
withDropListButton;
yourself.
pt textMorph
autoFit: true;
wrapFlag: false;
margins: (2@1 corner: 2@1).
^ pt
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
The method replaceText: is only called when some one type something in the text field directly.
But when I paste (cmd+v) some text in the field, the method replaceText: is not called.

How can I catch the "paste" (cmd+v) event?

Regards,
Juan Pablo