@@ -32,10 +32,10 @@ namespace microcode {
3232 fromBuffer ( buf : BufferReader ) : any {
3333 return undefined
3434 }
35- toText ( field : any ) : string {
35+ toString ( field : any ) : string {
3636 return ""
3737 }
38- fromText ( text : string ) : any {
38+ fromString ( text : string ) : any {
3939 return undefined
4040 }
4141 }
@@ -99,10 +99,10 @@ namespace microcode {
9999 const str = buf . readString ( )
100100 return { num : str }
101101 }
102- toText ( field : BoxedNumAsStr ) {
102+ toString ( field : BoxedNumAsStr ) {
103103 return field . num
104104 }
105- fromText ( txt : string ) {
105+ fromString ( txt : string ) {
106106 return { num : txt }
107107 }
108108 }
@@ -182,7 +182,7 @@ namespace microcode {
182182 }
183183 return img
184184 }
185- toText ( img : Bitmap ) {
185+ toString ( img : Bitmap ) {
186186 let ret = ""
187187 for ( let row = 0 ; row < 5 ; row ++ ) {
188188 for ( let col = 0 ; col < 5 ; col ++ ) {
@@ -192,7 +192,7 @@ namespace microcode {
192192 }
193193 return ret
194194 }
195- fromText ( txt : string ) : Bitmap {
195+ fromString ( txt : string ) : Bitmap {
196196 let ret = bitmaps . create ( 5 , 5 )
197197 let seq = txt . split ( " \n" )
198198 seq . forEach ( ( s , i ) => {
@@ -247,7 +247,7 @@ namespace microcode {
247247 let res = ""
248248 seq . forEach ( ( note , index ) => {
249249 if ( note == "-" ) res += "."
250- else res += noteNames . indexOf ( note ) . toString
250+ else res += noteNames . indexOf ( note ) . toString ( )
251251 } )
252252 return { notes : res , tempo : 120 }
253253 }
@@ -308,10 +308,10 @@ namespace microcode {
308308 }
309309 return { tempo, notes }
310310 }
311- toText ( melody : Melody ) : string {
311+ toString ( melody : Melody ) : string {
312312 return melodyToNotes ( melody )
313313 }
314- fromText ( txt : string ) : Melody {
314+ fromString ( txt : string ) : Melody {
315315 return notesToMelody ( txt )
316316 }
317317 }
0 commit comments