Show
Ignore:
Timestamp:
05/04/08 18:12:38 (7 months ago)
Author:
Frank Benoit <benoit@tionex.de>
branch:
default
Message:

reverted the char[] to String and use the an alias.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • dwt/custom/DefaultContent.d

    r155 r212  
    3030 
    3131class DefaultContent : StyledTextContent { 
    32     private final static char[] LineDelimiter = tango.io.FileConst.FileConst.NewlineString; 
     32    private final static String LineDelimiter = tango.io.FileConst.FileConst.NewlineString; 
    3333 
    3434    StyledTextListener[] textListeners; // stores text listeners for event sending 
    35     char[] textStore; // stores the actual text 
     35    String textStore; // stores the actual text 
    3636    int gapStart = -1;  // the character position start of the gap 
    3737    int gapEnd = -1;    // the character position after the end of the gap 
     
    188188 * @return a bool specifying whether or not the replace operation is valid 
    189189 */ 
    190 protected bool isValidReplace(int start, int replaceLength, char[] newText){ 
     190protected bool isValidReplace(int start, int replaceLength, String newText){ 
    191191    if (replaceLength is 0) { 
    192192        // inserting text, see if the \r\n line delimiter is being split 
     
    273273 * @param text the text to insert 
    274274 */ 
    275 void insert(int position, char[] text) { 
     275void insert(int position, String text) { 
    276276    if (text.length is 0) return; 
    277277 
     
    455455 * @return number of lines in the text 
    456456 */ 
    457 int lineCount(char[] text){ 
     457int lineCount(String text){ 
    458458    int lineCount_ = 0; 
    459459    int length = text.length; 
     
    488488 * </ul> 
    489489 */ 
    490 public char[] getLine(int index) { 
     490public String getLine(int index) { 
    491491    if ((index >= lineCount_) || (index < 0)) error(DWT.ERROR_INVALID_ARGUMENT); 
    492492    int start = lines[index][0]; 
     
    521521 *  system property. 
    522522 */ 
    523 public char[] getLineDelimiter() { 
     523public String getLineDelimiter() { 
    524524    return LineDelimiter; 
    525525} 
     
    530530 * @return the logical line text (i.e., without the gap) with delimiters 
    531531 */ 
    532 char[] getFullLine(int index) { 
     532String getFullLine(int index) { 
    533533    int start = lines[index][0]; 
    534534    int length_ = lines[index][1]; 
     
    553553 * @return the physical line 
    554554 */ 
    555 char[] getPhysicalLine(int index) { 
     555String getPhysicalLine(int index) { 
    556556    int start = lines[index][0]; 
    557557    int length_ = lines[index][1]; 
     
    701701 * @return the text 
    702702 */ 
    703 char[] getPhysicalText(int start, int length_) { 
     703String getPhysicalText(int start, int length_) { 
    704704    return textStore[ start .. start + length_ ].dup; 
    705705} 
     
    713713 * @return the text 
    714714 */ 
    715 public char[] getTextRange(int start, int length_) { 
     715public String getTextRange(int start, int length_) { 
    716716    if (textStore is null) 
    717717        return ""; 
     
    776776 * </ul> 
    777777 */ 
    778 public void replaceTextRange(int start, int replaceLength, char[] newText){ 
     778public void replaceTextRange(int start, int replaceLength, String newText){ 
    779779    // check for invalid replace operations 
    780780    if (!isValidReplace(start, replaceLength, newText)) DWT.error(DWT.ERROR_INVALID_ARGUMENT); 
     
    815815 * @param text the text 
    816816 */ 
    817 public void setText (char[] text){ 
     817public void setText (String text){ 
    818818    textStore = text.dup; 
    819819    gapStart = -1; 
     
    840840    int endLine = getLineAtOffset(position + length_); 
    841841 
    842     char[] endText = ""; 
     842    String endText = ""; 
    843843    bool splittingDelimiter = false; 
    844844    if (position + length_ < getCharCount()) {