equal
deleted
inserted
replaced
307 self initForString |
307 self initForString |
308 ]. |
308 ]. |
309 aTypeSymbol == #date ifTrue:[ |
309 aTypeSymbol == #date ifTrue:[ |
310 self initForDate |
310 self initForDate |
311 ]. |
311 ]. |
|
312 aTypeSymbol == #time ifTrue:[ |
|
313 self initForTime |
|
314 ]. |
|
315 aTypeSymbol == #timeOrNil ifTrue:[ |
|
316 self initForTimeOrNil |
|
317 ]. |
312 aTypeSymbol == #float ifTrue:[ |
318 aTypeSymbol == #float ifTrue:[ |
313 self initForFloat |
319 self initForFloat |
314 ]. |
320 ]. |
315 aTypeSymbol == #dateOrNil ifTrue:[ |
321 aTypeSymbol == #dateOrNil ifTrue:[ |
316 self initForDateOrNil |
322 self initForDateOrNil |
414 |
420 |
415 valueToStringBlock := [:val | val isNil ifTrue:[''] ifFalse:[val]]. |
421 valueToStringBlock := [:val | val isNil ifTrue:[''] ifFalse:[val]]. |
416 stringToValueBlock := [:string | string] |
422 stringToValueBlock := [:string | string] |
417 ! |
423 ! |
418 |
424 |
|
425 initForTime |
|
426 "initialize to convert to/from a time |
|
427 - if the string is empty or invalid, convert to the current time" |
|
428 |
|
429 valueToStringBlock := [:time | time printString]. |
|
430 stringToValueBlock := [:string | Time readFromString:string onError:[Time now]] |
|
431 ! |
|
432 |
|
433 initForTimeOrNil |
|
434 "initialize to convert to/from a time |
|
435 - if the string is empty or invalid, convert to nil" |
|
436 |
|
437 valueToStringBlock := [:time | time printString]. |
|
438 stringToValueBlock := [:string | Time readFromString:string onError:nil] |
|
439 ! |
|
440 |
419 initForYesNo |
441 initForYesNo |
420 "initialize to convert a 'yes'/'no' string to/from a boolean |
442 "initialize to convert a 'yes'/'no' string to/from a boolean |
421 The string is supposed to be in the current Language |
443 The string is supposed to be in the current Language |
422 (i.e. if german, ja/nein has to be enterred. |
444 (i.e. if german, ja/nein has to be enterred. |
423 Invalid entries are converted to false." |
445 Invalid entries are converted to false." |
439 ! ! |
461 ! ! |
440 |
462 |
441 !PrintConverter class methodsFor:'documentation'! |
463 !PrintConverter class methodsFor:'documentation'! |
442 |
464 |
443 version |
465 version |
444 ^ '$Header: /cvs/stx/stx/libview2/Attic/PrintConv.st,v 1.16 1997-02-11 19:08:41 ca Exp $' |
466 ^ '$Header: /cvs/stx/stx/libview2/Attic/PrintConv.st,v 1.17 1999-06-25 14:35:06 cg Exp $' |
445 ! ! |
467 ! ! |