Capturing values in a Spec window.
This commit is contained in:
parent
af2c4e10cd
commit
05daa3836c
@ -263,6 +263,14 @@ GrafoscopioNotebook >> extent [
|
||||
^900@500
|
||||
]
|
||||
|
||||
{ #category : #'as yet unclassified' }
|
||||
GrafoscopioNotebook >> findAndReplace [
|
||||
| currentNode |
|
||||
currentNode := tree highlightedItem content.
|
||||
GrafoscopioReplace new openWithSpec.
|
||||
currentNode find: '' andReplaceWith: nil.
|
||||
]
|
||||
|
||||
{ #category : #accessing }
|
||||
GrafoscopioNotebook >> header [
|
||||
^ header
|
||||
@ -794,7 +802,7 @@ GrafoscopioNotebook >> topBar [
|
||||
name: nil;
|
||||
description: 'Find & Replace';
|
||||
icon: #smallFind asIcon;
|
||||
action: [ self inform: 'To be implemented...' ] ] ];
|
||||
action: [ self findAndReplace ] ] ];
|
||||
addGroup: [ :group |
|
||||
group
|
||||
addItem: [ :item |
|
||||
|
@ -55,7 +55,9 @@ GrafoscopioReplace >> initializeWidgets [
|
||||
autoAccept: true.
|
||||
ok := self newButton
|
||||
label: 'OK';
|
||||
action: [ Transcript show: self find getText, String cr ].
|
||||
action: [
|
||||
self returnValues.
|
||||
self window close ].
|
||||
cancel := self newButton
|
||||
label: 'Cancel';
|
||||
action: [ self window close ].
|
||||
@ -64,7 +66,7 @@ GrafoscopioReplace >> initializeWidgets [
|
||||
add: replace;
|
||||
add: ok;
|
||||
add: cancel.
|
||||
self askOkToClose: true.
|
||||
self askOkToClose: true
|
||||
]
|
||||
|
||||
{ #category : #accessing }
|
||||
@ -92,6 +94,14 @@ GrafoscopioReplace >> replace: anObject [
|
||||
replace := anObject
|
||||
]
|
||||
|
||||
{ #category : #initialization }
|
||||
GrafoscopioReplace >> returnValues [
|
||||
^ Dictionary new
|
||||
at: 'find' put: find;
|
||||
at: 'replace' put: replace;
|
||||
yourself
|
||||
]
|
||||
|
||||
{ #category : #api }
|
||||
GrafoscopioReplace >> title [
|
||||
^ 'Find & Replace'
|
||||
|
Loading…
Reference in New Issue
Block a user