From fe07118f8451d047af8916230cfabfa8808e902d Mon Sep 17 00:00:00 2001 From: Offray Luna Date: Sat, 16 Sep 2017 21:21:06 +0000 Subject: [PATCH] initiazePresenter to be done. --- repository/Grafoscopio/GrafoscopioNotebook.class.st | 12 +++++++++--- repository/Grafoscopio/GrafoscopioReplace.class.st | 8 ++++++++ 2 files changed, 17 insertions(+), 3 deletions(-) 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