added #find (same as #search) to allow VW menus to function.
--- a/TextView.st Wed Jul 30 16:48:35 1997 +0200
+++ b/TextView.st Thu Jul 31 19:16:42 1997 +0200
@@ -1081,6 +1081,14 @@
"Modified: 3.7.1997 / 13:54:09 / cg"
!
+find
+ "same as search - for VW compatibility"
+
+ self search
+
+ "Created: 31.7.1997 / 19:13:58 / cg"
+!
+
gotoLine
"show a box to enter lineNumber for positioning"
@@ -1154,6 +1162,57 @@
]
"Modified: 5.1.1997 / 02:14:46 / cg"
+!
+
+search
+ "search for a string - show a box to enter searchpattern
+ - currently no regular expressions are handled."
+
+ "
+ Q: should we preserve the last searchstring between views ?
+ "
+
+ |searchBox|
+
+
+"/ "soon to come: search & replace box ...
+"/ |searchBox|
+"/
+"/ searchBox := Dialog new.
+"/ (searchBox addTextLabel:(resources at:'searchPattern:')) layout:#left.
+"/ searchBox addVerticalSpace.
+"/ searchBox addInputFieldOn:'' asValue.
+"/ searchBox addVerticalSpace.
+"/ (searchBox addTextLabel:(resources at:'replace with:')) layout:#left.
+"/ searchBox addVerticalSpace.
+"/ searchBox addInputFieldOn:'' asValue.
+"/ searchBox
+"/ addAbortButtonLabelled:(resources at:'cancel');
+"/ addButton:(Button label:(resources at:'all'));
+"/ addButton:(Button label:(resources at:'prev'));
+"/ addOkButtonLabelled:(resources at:'next').
+"/ searchBox open.
+
+ searchBox :=
+ EnterBox2
+ title:(resources at:'searchPattern:')
+ okText1:(resources at:'prev')
+ okText2:(resources at:'next')
+ abortText:(resources at:'cancel')
+ action1:[:pattern | pattern notEmpty ifTrue:[self searchBwd:(pattern withoutSeparators)]]
+ action2:[:pattern | pattern notEmpty ifTrue:[self searchFwd:(pattern withoutSeparators)]].
+
+ searchPattern notNil ifTrue:[
+ searchBox initialText:searchPattern
+ ].
+ self hasSelection ifTrue:[
+ selectionStartLine == selectionEndLine ifTrue:[
+ searchBox initialText:self selection
+ ]
+ ].
+ searchBox showAtPointer
+
+ "Modified: 31.7.1997 / 19:15:54 / cg"
! !
!TextView methodsFor:'private'!
@@ -1698,57 +1757,6 @@
!TextView methodsFor:'searching'!
-search
- "show a box to enter searchpattern
- - currently no regular expressions are handled."
-
- "
- cache the searchBox
- Q: should we use one global searchBox for all textViews ?
- (we could then preserve the last searchstring between views)
- "
- |searchBox|
-
-
-"/ "soon to come: search & replace box ...
-"/ |box|
-"/
-"/ box := Dialog new.
-"/ (box addTextLabel:(resources at:'searchPattern:')) layout:#left.
-"/ box addVerticalSpace.
-"/ box addInputFieldOn:'' asValue.
-"/ box addVerticalSpace.
-"/ (box addTextLabel:(resources at:'replace with:')) layout:#left.
-"/ box addVerticalSpace.
-"/ box addInputFieldOn:'' asValue.
-"/ box addAbortButtonLabelled:(resources at:'cancel');
-"/ addButton:(Button label:(resources at:'all'));
-"/ addButton:(Button label:(resources at:'prev'));
-"/ addOkButtonLabelled:(resources at:'next').
-"/ box open.
-
- searchBox :=
- EnterBox2
- title:(resources at:'searchPattern:')
- okText1:(resources at:'prev')
- okText2:(resources at:'next')
- abortText:(resources at:'cancel')
- action1:[:pattern | pattern notEmpty ifTrue:[self searchBwd:(pattern withoutSeparators)]]
- action2:[:pattern | pattern notEmpty ifTrue:[self searchFwd:(pattern withoutSeparators)]].
-
- searchPattern notNil ifTrue:[
- searchBox initialText:searchPattern
- ].
- self hasSelection ifTrue:[
- selectionStartLine == selectionEndLine ifTrue:[
- searchBox initialText:self selection
- ]
- ].
- searchBox showAtPointer
-
- "Modified: 6.3.1996 / 13:11:46 / cg"
-!
-
searchBwd
"search backward and -if found- position cursor"
@@ -2486,5 +2494,5 @@
!TextView class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libwidg/TextView.st,v 1.98 1997-07-03 12:29:11 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libwidg/TextView.st,v 1.99 1997-07-31 17:16:42 cg Exp $'
! !