From: <or...@us...> - 2014-07-11 10:17:11
|
Revision: 223 http://sourceforge.net/p/bsf4oorexx/code/223 Author: orexx Date: 2014-07-11 10:17:08 +0000 (Fri, 11 Jul 2014) Log Message: ----------- 20140711 Enhance sample to demonstrate redirecting ooRexx standard streams to the Java standard streams. Modified Paths: -------------- trunk/samples/Java/JavaRunRexx_06.class trunk/samples/Java/JavaRunRexx_06.java trunk/samples/Java/index.html trunk/samples/NetRexx/index.html trunk/samples/NetRexx/nrxRunRexx_06.class trunk/samples/NetRexx/nrxRunRexx_06.nrx Modified: trunk/samples/Java/JavaRunRexx_06.class =================================================================== (Binary files differ) Modified: trunk/samples/Java/JavaRunRexx_06.java =================================================================== --- trunk/samples/Java/JavaRunRexx_06.java 2014-07-11 09:47:02 UTC (rev 222) +++ trunk/samples/Java/JavaRunRexx_06.java 2014-07-11 10:17:08 UTC (rev 223) @@ -1,12 +1,12 @@ /* Author: Rony G. Flatscher - Date: 2014-07-04 + Date: 2014-07-04, 2014-07-11 Purpose: Demonstrate how to run Rexx programs one after the other, using the package (public routines, public classes) for the next Rexx invocation; this allows one to run Rexx programs and aggregate all public routines and public classes - Changed: --- + Changed: 2014-07-11, ---rgf: demonstrate redirecting ooRexx standard streams to Java Needs: ooRexx 4.0, BSF4ooRexx @@ -49,8 +49,10 @@ String createRoutineWithContext="return .routine~new(arg(1),arg(2),arg(3))"; // require BSF.CLS, which will cause an entry in .local named BSF, controlling argument conversion between Java and Rexx - System.out.println("--- 1 (Java): require BSF.CLS and keep routine in order to be able to access its package ..."); - String rexxCode="::requires BSF.CLS -- get and activate the Java support\n"; + System.out.println("--- 1 (Java): require BSF.CLS and keep routine in order to be able to access its package,\n" + + " redirect ooRexx standard streams to the standard Java streams..."); + String rexxCode="call bsf.redirectTo 'Java' -- redirect ooRexx' standard streams to Java streams \n" + + "::requires BSF.CLS -- get and activate the Java support \n"; Vector vArgs=new Vector(); vArgs.addElement("rexxPackage1"); // routine/package name Modified: trunk/samples/Java/index.html =================================================================== --- trunk/samples/Java/index.html 2014-07-11 09:47:02 UTC (rev 222) +++ trunk/samples/Java/index.html 2014-07-11 10:17:08 UTC (rev 223) @@ -54,12 +54,19 @@ [NetRexx version: <a href="../NetRexx/nrxRunRexx_05.nrx">nrxRunRexx_05.nrx</a>.] <dt><a href="JavaRunRexx_06.java">JavaRunRexx_06.java</a> - <dd>Demonstrate how to use the <em>context</em> of a Rexx routine for another - Rexx routine. The first routine requires <code>BSF.CLS</code> which adds + <dd>Demonstrate how to use the <em>context</em> of a Rexx routine (i.e. all public + routines and public classes available to it) for another + Rexx routine. + <br> + The first routine requires <code>BSF.CLS</code> which adds public routines and public classes which then are made available to Rexx - routines that get created and executed later via Java. Then another - Rexx routines gets defined to use the first package, and in addition + routines that get created and executed later via Java. In addition the + ooRexx standard streams get redirected to the Java standard streams by + calling the public routine <code>bsf.redirectTo</code>. + <br> + Then another Rexx routines gets defined to use the first package, and in addition defines a public routine named <code>test</code>. + <br> Finally, the last Rexx routine demonstrates getting access to the package of the second routine which makes its public routine named <code>test</code> accessible. In addition the last routine is called twice, once without @@ -70,6 +77,6 @@ <p> <hr> <p style="font-size: 80%;"> -Rony G. Flatscher, 2010-08-23, 2014-07-04, Wien/Vienna, Austria, Europe +Rony G. Flatscher, 2010-08-23, 2014-07-11, Wien/Vienna, Austria, Europe </body> Modified: trunk/samples/NetRexx/index.html =================================================================== --- trunk/samples/NetRexx/index.html 2014-07-11 09:47:02 UTC (rev 222) +++ trunk/samples/NetRexx/index.html 2014-07-11 10:17:08 UTC (rev 223) @@ -50,12 +50,18 @@ [Java version: <a href="../Java/JavaRunRexx_05.java">JavaRunRexx_05.java</a>.] <dt><a href="nrxRunRexx_06.nrx">nrxRunRexx_06.nrx</a> - <dd>Demonstrate how to use the <em>context</em> of a Rexx routine for another - Rexx routine. The first routine requires <code>BSF.CLS</code> which adds + <dd>Demonstrate how to use the <em>context</em> of a Rexx routine (i.e. all public + routines and public classes available to it) for another Rexx routine. + <br> + The first routine requires <code>BSF.CLS</code> which adds public routines and public classes which then are made available to Rexx - routines that get created and executed later via NetRexx (Java). + routines that get created and executed later via NetRexx (Java). In addition the + ooRexx standard streams get redirected to the Java standard streams by + calling the public routine <code>bsf.redirectTo</code>. + <br> Then another Rexx routines gets defined to use the first package, and in addition defines a public routine named <code>test</code>. + <br> Finally, the last Rexx routine demonstrates getting access to the package of the second routine which makes its public routine named <code>test</code> accessible. In addition the last routine is called twice, once without @@ -89,6 +95,6 @@ <p> <hr> <p style="font-size: 80%;"> -Rony G. Flatscher, 2011-01-15, 2014-07-04, Wien/Vienna, Austria, Europe +Rony G. Flatscher, 2011-01-15, 2014-07-11, Wien/Vienna, Austria, Europe </body> Modified: trunk/samples/NetRexx/nrxRunRexx_06.class =================================================================== (Binary files differ) Modified: trunk/samples/NetRexx/nrxRunRexx_06.nrx =================================================================== --- trunk/samples/NetRexx/nrxRunRexx_06.nrx 2014-07-11 09:47:02 UTC (rev 222) +++ trunk/samples/NetRexx/nrxRunRexx_06.nrx 2014-07-11 10:17:08 UTC (rev 223) @@ -9,8 +9,12 @@ createRoutineWithContext="return .routine~new(arg(1),arg(2),arg(3))" -- require BSF.CLS, which will cause an entry in .local named BSF, controlling argument conversion between Java and Rexx -say "--- 1 (NetRexx): require BSF.CLS and keep routine in order to be able to access its package ..." +say "--- 1 (NetRexx): require BSF.CLS and keep routine in order to be able to access its package," - + "\n\t\t redirect ooRexx standard streams to the standard Java streams..." + rexxCode="::requires BSF.CLS -- get and activate the Java support\n"; +rexxCode="call bsf.redirectTo 'Java' -- redirect ooRexx' standard streams to Java streams \n" - + "::requires BSF.CLS -- get and activate the Java support \n" vArgs=Vector() vArgs.addElement("rexxPackage1") -- routine/package name This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |