#FEATURE by cg
authorClaus Gittinger <cg@exept.de>
Wed, 13 Feb 2019 18:09:57 +0100
changeset 23729 772ddbedfb9d
parent 23728 8a0345aa717e
child 23730 79e4b8567d49
#FEATURE by cg class: Stream added: #show:_:_:_:_:_:_:_: #show:_:_:_:_:_:_:_:_: #showCR:_:_:_:_:_:_:_: #showCR:_:_:_:_:_:_:_:_:
Stream.st
--- a/Stream.st	Wed Feb 13 18:03:53 2019 +0100
+++ b/Stream.st	Wed Feb 13 18:09:57 2019 +0100
@@ -242,6 +242,43 @@
     self nextPut:(Character nl)
 ! !
 
+!Stream methodsFor:'JS syntactic sugar'!
+
+show:aString _:arg1 _:arg2 _:arg3 _:arg4 _:arg5 _:arg6 _:arg7
+    "for JS easy syntax - allows: Transcript.show('format %1 %2', arg1,...)"
+
+    self show:(aString bindWith:arg1 with:arg2 with:arg3 with:arg4 with:arg5 with:arg6 with:arg7).
+
+    "Created: / 13-02-2019 / 18:08:16 / Claus Gittinger"
+!
+
+show:aString _:arg1 _:arg2 _:arg3 _:arg4 _:arg5 _:arg6 _:arg7 _:arg8
+    "for JS easy syntax - allows: Transcript.show('format %1 %2', arg1,...)"
+
+    self show:(aString bindWith:arg1 with:arg2 with:arg3 with:arg4 with:arg5 with:arg6 with:arg7 with:arg8).
+
+    "Created: / 13-02-2019 / 18:09:28 / Claus Gittinger"
+!
+
+showCR:aString _:arg1 _:arg2 _:arg3 _:arg4 _:arg5 _:arg6 _:arg7
+    <javascript: 'log/8'>
+
+    "for JS easy syntax - allows: Transcript.showCR('format %1 %2', arg1,...)"
+
+    self showCR:(aString bindWith:arg1 with:arg2 with:arg3 with:arg4 with:arg5 with:arg6 with:arg7).
+
+    "Created: / 13-02-2019 / 18:08:43 / Claus Gittinger"
+!
+
+showCR:aString _:arg1 _:arg2 _:arg3 _:arg4 _:arg5 _:arg6 _:arg7 _:arg8
+    <javascript: 'log/9'>
+
+    "for JS easy syntax - allows: Transcript.showCR('format %1 %2', arg1,...)"
+
+    self showCR:(aString bindWith:arg1 with:arg2 with:arg3 with:arg4 with:arg5 with:arg6 with:arg7 with:arg8).
+
+    "Created: / 13-02-2019 / 18:09:17 / Claus Gittinger"
+! !
 
 !Stream methodsFor:'accessing'!