TextStream.st
author Claus Gittinger <cg@exept.de>
Fri, 22 Aug 1997 15:16:15 +0200
changeset 562 e41abf509444
parent 343 01f88d90c385
child 663 64bf2f5fec3c
permissions -rw-r--r--
comments
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
340
dcc2bb30c0c9 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     1
"
dcc2bb30c0c9 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     2
 COPYRIGHT (c) 1996 by Claus Gittinger
dcc2bb30c0c9 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     3
              All Rights Reserved
dcc2bb30c0c9 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     4
dcc2bb30c0c9 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     5
 This software is furnished under a license and may be used
dcc2bb30c0c9 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     6
 only in accordance with the terms of that license and with the
dcc2bb30c0c9 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     7
 inclusion of the above copyright notice.   This software may not
dcc2bb30c0c9 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     8
 be provided or otherwise made available to, or used by, any
dcc2bb30c0c9 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     9
 other person.  No title to or ownership of the software is
dcc2bb30c0c9 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    10
 hereby transferred.
dcc2bb30c0c9 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    11
"
dcc2bb30c0c9 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    12
dcc2bb30c0c9 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    13
dcc2bb30c0c9 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    14
WriteStream subclass:#TextStream
dcc2bb30c0c9 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    15
	instanceVariableNames:'runs currentEmphasis'
dcc2bb30c0c9 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    16
	classVariableNames:''
dcc2bb30c0c9 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    17
	poolDictionaries:''
dcc2bb30c0c9 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    18
	category:'Streams'
dcc2bb30c0c9 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    19
!
dcc2bb30c0c9 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    20
dcc2bb30c0c9 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    21
!TextStream class methodsFor:'documentation'!
dcc2bb30c0c9 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    22
dcc2bb30c0c9 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    23
copyright
dcc2bb30c0c9 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    24
"
dcc2bb30c0c9 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    25
 COPYRIGHT (c) 1996 by Claus Gittinger
dcc2bb30c0c9 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    26
              All Rights Reserved
dcc2bb30c0c9 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    27
dcc2bb30c0c9 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    28
 This software is furnished under a license and may be used
dcc2bb30c0c9 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    29
 only in accordance with the terms of that license and with the
dcc2bb30c0c9 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    30
 inclusion of the above copyright notice.   This software may not
dcc2bb30c0c9 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    31
 be provided or otherwise made available to, or used by, any
dcc2bb30c0c9 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    32
 other person.  No title to or ownership of the software is
dcc2bb30c0c9 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    33
 hereby transferred.
dcc2bb30c0c9 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    34
"
dcc2bb30c0c9 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    35
dcc2bb30c0c9 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    36
!
dcc2bb30c0c9 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    37
dcc2bb30c0c9 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    38
documentation
dcc2bb30c0c9 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    39
"
562
e41abf509444 comments
Claus Gittinger <cg@exept.de>
parents: 343
diff changeset
    40
    a textStream is much like a regular writeStream;
340
dcc2bb30c0c9 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    41
    however, in addition to collecting characters, it keeps
dcc2bb30c0c9 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    42
    track of any change of the emphasis, and returns a Text instance
dcc2bb30c0c9 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    43
    as its contents (in contrast to a String instance).
dcc2bb30c0c9 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    44
    Can be used to collect up attributed text.
dcc2bb30c0c9 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    45
dcc2bb30c0c9 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    46
    [author:]
dcc2bb30c0c9 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    47
        Claus Gittinger
dcc2bb30c0c9 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    48
dcc2bb30c0c9 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    49
    [see also:]
dcc2bb30c0c9 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    50
        WriteStream
dcc2bb30c0c9 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    51
        Text String
dcc2bb30c0c9 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    52
"
dcc2bb30c0c9 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    53
dcc2bb30c0c9 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    54
!
dcc2bb30c0c9 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    55
dcc2bb30c0c9 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    56
examples
dcc2bb30c0c9 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    57
"
dcc2bb30c0c9 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    58
                                                                [exBegin]
dcc2bb30c0c9 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    59
     |s|
dcc2bb30c0c9 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    60
dcc2bb30c0c9 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    61
     s := TextStream on:''.
dcc2bb30c0c9 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    62
     s emphasis:#italic;
dcc2bb30c0c9 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    63
       nextPutAll:'hello';
dcc2bb30c0c9 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    64
       emphasis:nil;
dcc2bb30c0c9 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    65
       space;
dcc2bb30c0c9 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    66
       emphasis:#bold;
dcc2bb30c0c9 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    67
       nextPutAll:'world'.
dcc2bb30c0c9 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    68
     s contents inspect
dcc2bb30c0c9 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    69
                                                                [exEnd]
dcc2bb30c0c9 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    70
dcc2bb30c0c9 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    71
                                                                [exBegin]
dcc2bb30c0c9 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    72
     |s|
dcc2bb30c0c9 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    73
dcc2bb30c0c9 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    74
     s := TextStream on:''.
dcc2bb30c0c9 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    75
     s emphasis:#italic;
dcc2bb30c0c9 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    76
       nextPutAll:'hello';
dcc2bb30c0c9 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    77
       emphasis:nil;
dcc2bb30c0c9 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    78
       space;
dcc2bb30c0c9 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    79
       emphasis:#bold;
dcc2bb30c0c9 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    80
       nextPutAll:'world'.
dcc2bb30c0c9 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    81
562
e41abf509444 comments
Claus Gittinger <cg@exept.de>
parents: 343
diff changeset
    82
     Transcript nextPutAll:(s contents)
e41abf509444 comments
Claus Gittinger <cg@exept.de>
parents: 343
diff changeset
    83
                                                                [exEnd]
e41abf509444 comments
Claus Gittinger <cg@exept.de>
parents: 343
diff changeset
    84
e41abf509444 comments
Claus Gittinger <cg@exept.de>
parents: 343
diff changeset
    85
                                                                [exBegin]
e41abf509444 comments
Claus Gittinger <cg@exept.de>
parents: 343
diff changeset
    86
     |s|
e41abf509444 comments
Claus Gittinger <cg@exept.de>
parents: 343
diff changeset
    87
e41abf509444 comments
Claus Gittinger <cg@exept.de>
parents: 343
diff changeset
    88
     s := TextStream on:''.
e41abf509444 comments
Claus Gittinger <cg@exept.de>
parents: 343
diff changeset
    89
     s emphasis:#italic;
e41abf509444 comments
Claus Gittinger <cg@exept.de>
parents: 343
diff changeset
    90
       nextPutAll:'hello';
e41abf509444 comments
Claus Gittinger <cg@exept.de>
parents: 343
diff changeset
    91
       emphasis:nil;
e41abf509444 comments
Claus Gittinger <cg@exept.de>
parents: 343
diff changeset
    92
       space;
e41abf509444 comments
Claus Gittinger <cg@exept.de>
parents: 343
diff changeset
    93
       emphasis:#bold;
e41abf509444 comments
Claus Gittinger <cg@exept.de>
parents: 343
diff changeset
    94
       nextPutAll:'world'.
e41abf509444 comments
Claus Gittinger <cg@exept.de>
parents: 343
diff changeset
    95
340
dcc2bb30c0c9 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    96
     Dialog
dcc2bb30c0c9 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    97
        warn:(s contents)
dcc2bb30c0c9 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    98
                                                                [exEnd]
dcc2bb30c0c9 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    99
dcc2bb30c0c9 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   100
                                                                [exBegin]
dcc2bb30c0c9 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   101
     |s1 s2 flipFlop|
dcc2bb30c0c9 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   102
dcc2bb30c0c9 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   103
     s1 := PipeStream readingFrom:'ls -l'.
dcc2bb30c0c9 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   104
     s2 := TextStream on:''.
dcc2bb30c0c9 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   105
dcc2bb30c0c9 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   106
     flipFlop := true.
dcc2bb30c0c9 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   107
     [s1 atEnd] whileFalse:[
dcc2bb30c0c9 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   108
        flipFlop ifTrue:[
dcc2bb30c0c9 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   109
            s2 emphasis:(#color->Color red)
dcc2bb30c0c9 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   110
        ] ifFalse:[
dcc2bb30c0c9 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   111
            s2 emphasis:nil
dcc2bb30c0c9 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   112
        ].
dcc2bb30c0c9 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   113
        flipFlop := flipFlop not.
dcc2bb30c0c9 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   114
        s2 nextPutAll:(s1 nextLine).
dcc2bb30c0c9 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   115
        s2 cr.
dcc2bb30c0c9 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   116
     ].
dcc2bb30c0c9 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   117
     s1 close.
dcc2bb30c0c9 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   118
dcc2bb30c0c9 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   119
     (EditTextView new contents:s2 contents) open
dcc2bb30c0c9 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   120
                                                                [exEnd]
dcc2bb30c0c9 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   121
"
dcc2bb30c0c9 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   122
! !
dcc2bb30c0c9 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   123
dcc2bb30c0c9 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   124
!TextStream methodsFor:'accessing'!
dcc2bb30c0c9 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   125
dcc2bb30c0c9 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   126
contents
dcc2bb30c0c9 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   127
    "return the streams collected contents"
dcc2bb30c0c9 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   128
dcc2bb30c0c9 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   129
    self closeRun.
dcc2bb30c0c9 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   130
    ^ Text string:super contents emphasisCollection:runs
dcc2bb30c0c9 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   131
dcc2bb30c0c9 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   132
    "
dcc2bb30c0c9 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   133
     |s|
dcc2bb30c0c9 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   134
dcc2bb30c0c9 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   135
     s := TextStream on:String new.
dcc2bb30c0c9 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   136
     s emphasis:#italic.
dcc2bb30c0c9 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   137
     s nextPutAll:'hello'.
dcc2bb30c0c9 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   138
     s emphasis:nil.
dcc2bb30c0c9 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   139
     s space.
dcc2bb30c0c9 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   140
     s emphasis:#bold.
dcc2bb30c0c9 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   141
     s nextPutAll:'world'.
dcc2bb30c0c9 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   142
     s contents
dcc2bb30c0c9 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   143
    "
dcc2bb30c0c9 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   144
!
dcc2bb30c0c9 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   145
dcc2bb30c0c9 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   146
emphasis:aSymbol
343
01f88d90c385 commentary
Claus Gittinger <cg@exept.de>
parents: 340
diff changeset
   147
    "change the emphasis; all followup elements are appended with
01f88d90c385 commentary
Claus Gittinger <cg@exept.de>
parents: 340
diff changeset
   148
     that emphasis in effect"
01f88d90c385 commentary
Claus Gittinger <cg@exept.de>
parents: 340
diff changeset
   149
340
dcc2bb30c0c9 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   150
    position ~~ 1 ifTrue:[
dcc2bb30c0c9 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   151
        self closeRun.
dcc2bb30c0c9 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   152
    ].
dcc2bb30c0c9 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   153
    currentEmphasis := aSymbol
dcc2bb30c0c9 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   154
dcc2bb30c0c9 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   155
    "
dcc2bb30c0c9 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   156
     |s|
dcc2bb30c0c9 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   157
dcc2bb30c0c9 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   158
     s := TextStream on:String new.
343
01f88d90c385 commentary
Claus Gittinger <cg@exept.de>
parents: 340
diff changeset
   159
     s emphasis:#italic;
01f88d90c385 commentary
Claus Gittinger <cg@exept.de>
parents: 340
diff changeset
   160
       nextPutAll:'hello';
01f88d90c385 commentary
Claus Gittinger <cg@exept.de>
parents: 340
diff changeset
   161
       emphasis:nil;
01f88d90c385 commentary
Claus Gittinger <cg@exept.de>
parents: 340
diff changeset
   162
       space;
01f88d90c385 commentary
Claus Gittinger <cg@exept.de>
parents: 340
diff changeset
   163
       emphasis:#bold;
01f88d90c385 commentary
Claus Gittinger <cg@exept.de>
parents: 340
diff changeset
   164
       nextPutAll:'world'.
340
dcc2bb30c0c9 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   165
     s contents
dcc2bb30c0c9 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   166
    "
dcc2bb30c0c9 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   167
! !
dcc2bb30c0c9 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   168
dcc2bb30c0c9 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   169
!TextStream methodsFor:'private'!
dcc2bb30c0c9 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   170
dcc2bb30c0c9 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   171
closeRun
dcc2bb30c0c9 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   172
    position ~~ 1 ifTrue:[
dcc2bb30c0c9 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   173
        runs isNil ifTrue:[
dcc2bb30c0c9 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   174
            runs := RunArray new:position-1 withAll:currentEmphasis
dcc2bb30c0c9 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   175
        ] ifFalse:[
dcc2bb30c0c9 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   176
            runs add:currentEmphasis withOccurrences:(position - runs size - 1)
dcc2bb30c0c9 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   177
        ]
dcc2bb30c0c9 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   178
    ]
dcc2bb30c0c9 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   179
! !
dcc2bb30c0c9 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   180
dcc2bb30c0c9 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   181
!TextStream class methodsFor:'documentation'!
dcc2bb30c0c9 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   182
dcc2bb30c0c9 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   183
version
562
e41abf509444 comments
Claus Gittinger <cg@exept.de>
parents: 343
diff changeset
   184
    ^ '$Header: /cvs/stx/stx/libbasic2/TextStream.st,v 1.3 1997-08-22 13:16:15 cg Exp $'
340
dcc2bb30c0c9 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   185
! !