Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Object REXX
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== Bridges == While ooRexx compared to Object REXX no longer contains classes for SOM and WPS support, it offers [[application programming interfaces]] (APIs) for interacting with code written in [[C (programming language)|C]] or [[C++]].<ref name=":8">{{Cite book |last1=Ashley |first1=W. David |url=https://sourceforge.net/projects/oorexx/files/oorexx-docs/5.0.0/rexxapi.pdf |title=ooRexx Documentation 5.0.0 Application Programming Interfaces |last2=Flatscher |first2=Rony G. |last3=Hessling |first3=Mark |last4=McGuire |first4=Rick |last5=Peedin |first5=Lee |last6=Sims |first6=Oliver |last7=Wolfers |first7=Jon |date=2022 |publisher=RexxLA}}</ref> There is also an external library that implements a bidirectional [[Java (programming language)|Java]] bridge, which enables interaction between ooRexx and Java.<ref name=":4" /> Furthermore, there are classes that enable interaction with SQL databases and classes are provided that enable the automation of Windows applications. === C/C++ APIs === As classic Rexx, ooRexx includes APIs for extending Rexx with applications written in C and vice versa. This enables the creation of [[Callback (computer programming)|handlers]] for subcommands used in Rexx programs that run as application [[Macro (computer science)|macros]], external functions that allow a direct extension of the ooRexx function set and system functions that allow the behavior of the interpreter to be customized.<ref name=":8" /> With ooRexx 4.0.0 APIs have been introduced that allow C++ applications to extend ooRexx and vice versa. This includes handlers for methods and functions written in C++ that extend ooRexx, both packaged as external libraries. These are [[Dynamic-link library|dynamic link libraries]] on Windows or as [[Shared library|shared libraries]] on Unix-based systems. An external library can be loaded with the <code>::REQUIRES</code> directive or by using the <code>EXTERNAL</code> keyword instruction as part of a <code>::ROUTINE</code>, <code>::METHOD</code>, or <code>::ATTRIBUTE</code> directive. === Java === [[File:BSF4ooREXX awt.png|alt=Java Swing via BSF4ooRexx|thumb|300x300px|Multi-platform GUIs via BSF4ooRexx]] Using the C++ APIs, BSF4ooRexx was developed as a bidirectional Java bridge based on the [[Bean Scripting Framework]]. This bridge enables ooRexx to communicate with Java objects and Java to interact with Rexx applications.<ref name=":10">{{Cite web |title=BSF4ooRexx |url=https://sourceforge.net/projects/bsf4oorexx/ |access-date=2024-11-10 |website=sourceforge.net|date=12 August 2024 }}</ref><ref name=":11">{{Cite news |last=Flatscher |first=Rony G. |date=2009 |title=The 2009 Edition of BSF4Rexx Part I |url=https://www.rexxla.org/presentations/2009/2009_orx20_BSF4Rexx_01.pdf |work=20th Rexx Language Symposium |publisher=RexxLA}}</ref> The bridge is realized by requiring the ooRexx package <code>BSF.CLS</code>, which defines public routines, classes and the environment symbol <code>.BSF4REXX</code>.<ref name=":11" /> Examples are provided for the use of Java classes in connection with [[Abstract Window Toolkit|AWT]], [[Swing (Java)|Swing]], [[JavaFX]], [[Java Database Connectivity|JDBC]], [[Java 2D]] and some others.<ref name=":10" /><syntaxhighlight lang="oorexx" style="background-color: #ffffff; !important" line="1">/* create Java object */ frame=.bsf~new("javax.swing.JFrame", "Hello, my beloved world - from ooRexx!") frame~setSize(410,20) /* set width and height */ frame~visible=.true /* make JFrame visible */ call SysSleep 10 /* sleep for ten seconds */ ::requires "BSF.CLS" /* get Java support */</syntaxhighlight> Based on BSF4ooRexx, interaction with [[Universal Network Objects]] (UNO), as used in [[OpenOffice.org|OpenOffice]] and [[LibreOffice]], is supported via the <code>UNO.CLS</code> package.<ref>{{Cite book |last=Waglechner |first=Christoph |url=https://wi.wu.ac.at/rgf/diplomarbeiten/BakkStuff/2009/20090621-Waglechner-Pitonyak-OOo/Waglechner_PitonyakNutshells.pdf |title=OpenOffice.org Automation Using ooRexx Scripting Language by means of Selected Nutshell Examples by Andrew Pitonyak |date=2009}}</ref> In addition, the <code>CLR.CLS</code> package together with [https://github.com/jni4net/jni4net Jini4Net] enables the use of the [[.NET Framework|.NET framework]].<ref>{{Cite book |last=Baginski |first=Adrian |url=https://wi.wu.ac.at/rgf/diplomarbeiten/BakkStuooR2016/20160723_Baginski-Adrian-ooRexx-Net-Cookbook.pdf |title=A .NET Cookbook Using ooRexx.NET |date=2016}}</ref> Communication with processes via the [[D-Bus]] [[middleware]] under Linux is possible using the <code>DBUS.CLS</code> package.<ref>{{Cite book |last=Lagler |first=Richard |url=https://wi.wu.ac.at/rgf/diplomarbeiten/Seminararbeiten/2015/20150220-Lagler-DBus.pdf |title=D-Bus Language Binding for ooRexx: An Introduction on Nutshell Examples |date=2015}}</ref> === SQL === The ooSQLite class provides an interface to [[SQLite]], an in-process library that implements a self-contained, serverless, zero-configuration, transactional [[SQL]] database engine.<ref>{{Cite book |last1=Ashley |first1=W. David |url=https://sourceforge.net/projects/oorexx/files/oorexx-docs/5.0.0/oosqlite.pdf |title=ooRexx Documentation 1.0.0 ooSQLite Reference |last2=Flatscher |first2=Rony G. |last3=McGuire |first3=Rick |last4=Miesfeld |first4=Mark |last5=Peedin |first5=Lee |last6=Sims |first6=Oliver |last7=Wolfers |first7=Jon |publisher=RexxLA |year=2022}}</ref> It allows interaction with several variants of SQL databases without having to change the script, but multi-threading is not supported.<ref>{{Cite web |title=OREXX/SQL Object Framework - EDM2 |url=http://www.edm2.com/index.php/OREXX/SQL_Object_Framework |access-date=2024-12-11 |website=www.edm2.com}}</ref> The external Rexx/SQL package enables access to SQL databases of different vendors via [[Open Database Connectivity]] (ODBC).<ref>{{Cite web |date=2013-06-19 |title=Rexx/SQL |url=https://sourceforge.net/projects/rexxsql/ |access-date=2025-02-03 |website=SourceForge |language=en}}</ref> With the goal of providing more functionality than a subset of ODBC and being [[Thread safety|thread-safe]], the Rexx MySQL library provides a wrapper in C to add [[MySQL]] support.<ref>{{Cite web |date=2013-04-25 |title=REXX MySQL Library |url=https://sourceforge.net/projects/rexx-mysql/ |access-date=2025-02-03 |website=SourceForge |language=en}}</ref> === Windows automation === The Windows extension includes the [[Windows Script Host]] (WSH) Scripting Engine that can be used to perform general automation tasks. It also includes [[Object Linking and Embedding]]/[[ActiveX]] (OLE) support allowing to interact with Windows programs via the <code>OLEObject</code>.<ref name=":5">{{Cite book |last1=Ashley |first1=W. David |url=https://sourceforge.net/projects/oorexx/files/oorexx-docs/5.0.0/winextensions.pdf |title=ooRexx Documentation 5.0.0 Windows Extensions Reference |last2=Flatscher |first2=Rony G. |last3=Hessling |first3=Mark |last4=McGuire |first4=Rick |last5=Peedin |first5=Lee |last6=Sims |first6=Oliver |last7=Sims |first7=Oliver |last8=Wolfers |first8=Jon |publisher=RexxLA |year=2022}}</ref> [[OLE Automation]] is an [[inter-process communication]] mechanism developed by [[Microsoft]] that is based on a subset of the [[Component Object Model]] (COM). This mechanism enables, among other things, the invocation of program functions, the querying and setting of attributes and the interception of component events. The ooRexx interpreter comes with examples that demonstrate OLE interaction with [[Microsoft Access|Access]], [[Microsoft Word|Word]], [[Microsoft Excel|Excel]], [[OpenOffice (Apache)|OpenOffice]]/[[LibreOffice]], [[Active Directory|ActiveDirectory]], [[Windows Management Instrumentation|WMI]] and other programs. Furthermore, a utility program for searching available OLE objects is included.<ref name=":9" /><syntaxhighlight lang="oorexx" style="background-color: #ffffff; !important" line="1"> exc = .OLEObject~new("Excel.Application") /* create object for Excel */ exc~visible = .true /* make Excel visible */ Worksheet = exc~Workbooks~Add~Worksheets[1] /* add worksheet */ Worksheet~cells(1,1)~Value = “First Cell” /* insert string into cell */ </syntaxhighlight>In addition to OLE support, the Windows extension enables interaction with the Windows program manager, the [[Tracing (software)|system event log]], the [[Clipboard (computing)|clipboard]] and the [[Windows Registry|registry]] as well as to query, edit and interact with windows, menus or sub-menus.<ref name=":5" />
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)