From 2c9e66b92d90e73d2a04430ec266efc7c0c0f790 Mon Sep 17 00:00:00 2001 From: Offray Luna Date: Sat, 9 Sep 2017 20:05:31 +0000 Subject: [PATCH] Defining new UI for the find:andReplaceWith: method. --- .../Grafoscopio/GrafoscopioReplace.class.st | 38 +++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 repository/Grafoscopio/GrafoscopioReplace.class.st diff --git a/repository/Grafoscopio/GrafoscopioReplace.class.st b/repository/Grafoscopio/GrafoscopioReplace.class.st new file mode 100644 index 0000000..39b7dbe --- /dev/null +++ b/repository/Grafoscopio/GrafoscopioReplace.class.st @@ -0,0 +1,38 @@ +" +I'm a tool for finding and replacing text ocurrences in notebook +nodes. +" +Class { + #name : #GrafoscopioReplace, + #superclass : #ComposableModel, + #instVars : [ + 'find', + 'replace', + 'ok', + 'cancel' + ], + #category : #'Grafoscopio-UI' +} + +{ #category : #specs } +GrafoscopioReplace class >> defaultSpec [ + + SpecColumnLayout composed + add: #find; add: #replace; "add: #ok; add: #cancel;" + yourself +] + +{ #category : #initialization } +GrafoscopioReplace >> initializeWidgets [ + find := self newText. + replace := self newText. + ok := self newButton + label: 'OK'. + cancel := self newButton + label: 'Cancel'. + self focusOrder + add: find; + add: replace"; + add: ok; + add: cancel". +]