--- a/Text.st Wed Dec 11 21:06:56 1996 +0100
+++ b/Text.st Tue Dec 31 13:52:46 1996 +0100
@@ -157,7 +157,7 @@
"create a Text instance, for the characters in aString,
without emphasis."
- ^ self new string:aString emphasis:nil
+ ^ super new string:aString emphasis:nil
"
Text fromString:'hello'
@@ -166,6 +166,18 @@
"Modified: 12.5.1996 / 17:05:34 / cg"
!
+new
+ "create a new empty Text instance.
+ Redefined for string-protocol compatibility"
+
+ ^ super new string:(String new) emphasis:nil
+
+ "Text new"
+
+ "Modified: 12.5.1996 / 17:05:17 / cg"
+ "Modified: 31.12.1996 / 12:39:57 / stefan"
+!
+
new:size
"create a new empty Text instance.
Redefined for string-protocol compatibility"
@@ -180,7 +192,7 @@
"create a Text instance, for the characters in aString,
without emphasis."
- ^ self new string:aString emphasis:nil
+ ^ super new string:aString emphasis:nil
"
Text string:'hello'
@@ -194,7 +206,7 @@
which are colored as aColor (only the foregroundColor is affected).
This is a shortCut for creating an emphasis of #color->aColor)"
- ^ self new string:aString emphasis:(#color->aColor)
+ ^ super new string:aString emphasis:(#color->aColor)
"
Dialog
@@ -209,7 +221,7 @@
"create a Text instance, for the characters in aString,
which are emphasized as described by attribute."
- ^ self new string:aString emphasis:attribute
+ ^ super new string:aString emphasis:attribute
"
Text string:'hello' emphasis:#bold
@@ -234,7 +246,7 @@
"create a Text instance, for the characters in aString,
which are individually emphasized as described by attributeCollection."
- ^ self new string:aString emphasisCollection:attributeCollection
+ ^ super new string:aString emphasisCollection:attributeCollection
"
Text
@@ -257,7 +269,7 @@
This is a shortCut for creating an emphasis of
#( #color->fgColor) (#backgroundColor->bgColor)"
- ^ self new
+ ^ super new
string:aString
emphasis:(Array with:#color->fgColor
with:#backgroundColor->bgColor)
@@ -277,7 +289,7 @@
"create a Text instance, for the characters in aString,
which are individually emphasized as described by attributeCollection."
- ^ self new string:aString emphasisCollection:aRun.
+ ^ super new string:aString emphasisCollection:aRun.
! !
!Text class methodsFor:'emphasis helper'!
@@ -1139,6 +1151,6 @@
!Text class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libbasic2/Text.st,v 1.30 1996-10-22 20:18:18 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic2/Text.st,v 1.31 1996-12-31 12:52:46 stefan Exp $'
! !
Text initialize!