diff --git a/repository/Grafoscopio/GrafoscopioNotebook.class.st b/repository/Grafoscopio/GrafoscopioNotebook.class.st index 600e823..c9a80a4 100644 --- a/repository/Grafoscopio/GrafoscopioNotebook.class.st +++ b/repository/Grafoscopio/GrafoscopioNotebook.class.st @@ -265,10 +265,16 @@ GrafoscopioNotebook >> extent [ { #category : #'as yet unclassified' } GrafoscopioNotebook >> findAndReplace [ - | currentNode | + | currentNode replaceGUI findString replaceString | currentNode := tree highlightedItem content. - GrafoscopioReplace new openWithSpec. - currentNode find: '' andReplaceWith: nil. + replaceGUI := GrafoscopioReplace new. + replaceGUI openWithSpec. + replaceGUI ok state + whenChangedDo: [ + findString := replaceGUI returnValues at: 'find'. + replaceString := replaceGUI returnValues at: 'replace'. + currentNode find: findString andReplaceWith: replaceString. ] + ] { #category : #accessing } diff --git a/repository/Grafoscopio/GrafoscopioReplace.class.st b/repository/Grafoscopio/GrafoscopioReplace.class.st index 3b2e7ab..f16256c 100644 --- a/repository/Grafoscopio/GrafoscopioReplace.class.st +++ b/repository/Grafoscopio/GrafoscopioReplace.class.st @@ -45,6 +45,14 @@ GrafoscopioReplace >> find: anObject [ find := anObject ] +{ #category : #initialization } +GrafoscopioReplace >> initializePresenter [ + "Here we need to deal with changes in the OK button to send messages about the + state of the 'find' and 'replace' variables or do nothing if 'Cancel' is pressed." + self shouldBeImplemented + +] + { #category : #initialization } GrafoscopioReplace >> initializeWidgets [ find := self newTextInput