Kernel-Transcript.st 941 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. Smalltalk current createPackage: 'Kernel-Transcript'!
  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. <console.log(String(string._asString()))>
  17. ! !
  18. !ConsoleTranscript class methodsFor: 'initialization'!
  19. initialize
  20. Transcript register: self new
  21. ! !
  22. Object subclass: #Transcript
  23. instanceVariableNames: 'textarea'
  24. package: 'Kernel-Transcript'!
  25. Transcript class instanceVariableNames: 'current'!
  26. !Transcript class methodsFor: 'instance creation'!
  27. current
  28. ^current
  29. !
  30. new
  31. self shouldNotImplement
  32. !
  33. open
  34. self current open
  35. !
  36. register: aTranscript
  37. current := aTranscript
  38. ! !
  39. !Transcript class methodsFor: 'printing'!
  40. clear
  41. self current clear
  42. !
  43. cr
  44. self current show: String cr
  45. !
  46. show: anObject
  47. self current show: anObject
  48. ! !