1
0

Kernel-Transcript.st 1005 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. Smalltalk current createPackage: 'Kernel-Transcript' properties: #{}!
  2. Object subclass: #ConsoleTranscript
  3. instanceVariableNames: 'textarea'
  4. package: 'Kernel-Transcript'!
  5. !ConsoleTranscript methodsFor: 'actions'!
  6. open
  7. ! !
  8. !ConsoleTranscript methodsFor: 'printing'!
  9. clear
  10. "no op"
  11. !
  12. cr
  13. "no op"
  14. !
  15. show: anObject
  16. | string |
  17. string := anObject asString.
  18. <console.log(String(string))>
  19. ! !
  20. !ConsoleTranscript class methodsFor: 'initialization'!
  21. initialize
  22. Transcript register: self new
  23. ! !
  24. Object subclass: #Transcript
  25. instanceVariableNames: 'textarea'
  26. package: 'Kernel-Transcript'!
  27. Transcript class instanceVariableNames: 'current'!
  28. !Transcript class methodsFor: 'instance creation'!
  29. current
  30. ^current
  31. !
  32. new
  33. self shouldNotImplement
  34. !
  35. open
  36. self current open
  37. !
  38. register: aTranscript
  39. current := aTranscript
  40. ! !
  41. !Transcript class methodsFor: 'printing'!
  42. clear
  43. self current clear
  44. !
  45. cr
  46. self current show: String cr
  47. !
  48. show: anObject
  49. self current show: anObject
  50. ! !