GrafoscopioFind > Closing of the window: starting implementation.

This commit is contained in:
Offray Vladimir Luna Cárdenas 2017-09-16 18:39:26 +00:00 committed by SantiagoBragagnolo
parent 35e670444c
commit f6c21668ea
2 changed files with 59 additions and 3 deletions

View File

@ -34,13 +34,53 @@ GrafoscopioButtonModel >> button: anObject [
button := anObject
]
{ #category : #accessing }
GrafoscopioButtonModel >> cancel [
^ cancel
]
{ #category : #accessing }
GrafoscopioButtonModel >> cancel: anObject [
cancel := anObject
]
{ #category : #api }
GrafoscopioButtonModel >> content: anAssoc [
button label: anAssoc key.
button action: anAssoc value.
]
{ #category : #accessing }
GrafoscopioButtonModel >> find [
^ find
]
{ #category : #accessing }
GrafoscopioButtonModel >> find: anObject [
find := anObject
]
{ #category : #initalize }
GrafoscopioButtonModel >> initializeWidgets [
button := self newButton.
]
{ #category : #accessing }
GrafoscopioButtonModel >> ok [
^ ok
]
{ #category : #accessing }
GrafoscopioButtonModel >> ok: anObject [
ok := anObject
]
{ #category : #accessing }
GrafoscopioButtonModel >> replace [
^ replace
]
{ #category : #accessing }
GrafoscopioButtonModel >> replace: anObject [
replace := anObject
]

View File

@ -47,18 +47,24 @@ GrafoscopioReplace >> find: anObject [
{ #category : #initialization }
GrafoscopioReplace >> initializeWidgets [
find := self newText.
replace := self newText.
find := self newTextInput
ghostText: 'Text to find...';
autoAccept: true.
replace := self newTextInput
ghostText: 'Text to replace...';
autoAccept: true.
ok := self newButton
label: 'OK';
action: [ Transcript show: self find getText ].
cancel := self newButton
label: 'Cancel'.
label: 'Cancel';
action: [ super closeWindowAction ].
self focusOrder
add: find;
add: replace;
add: ok;
add: cancel.
self askOkToClose: true.
]
{ #category : #accessing }
@ -71,6 +77,11 @@ GrafoscopioReplace >> ok: anObject [
ok := anObject
]
{ #category : #private }
GrafoscopioReplace >> okToChange [
^ false
]
{ #category : #accessing }
GrafoscopioReplace >> replace [
^ replace
@ -80,3 +91,8 @@ GrafoscopioReplace >> replace [
GrafoscopioReplace >> replace: anObject [
replace := anObject
]
{ #category : #api }
GrafoscopioReplace >> title [
^ 'Find & Replace'
]