I'm a bit confused about the scope of PRIVATE versus PUBLIC classes. In the
ooRexx documentation under the ::CLASS directive it says:
*If you specify the PUBLIC option, the class is visible beyond its
containing Rexx program to any other program that references this program
with a ::REQUIRES directive. (See ::REQUIRES.) If you do not specify the
PUBLIC option, the class is visible only within its containing Rexx program*
So if I compile the example below like this: REXXC a.cls ab.bin
file a.cls:
::CLASS A PUBLIC
::METHOD init
say 'Hello from A'
b=.b~new
::REQUIRES b.cls
file b.cls:
::CLASS B PRIVATE
::METHOD init
say 'Hello from B'
then I would consider the result ab.bin to be "a containing Rexx program",
so that A can call B. Now, if I have:
file c.rex:
a=.a~new
::REQUIRES ab.bin
That IMHO should work, but it doesn't. I can see why c.rex should not be
able to call B but there is an error when A tries to call B.
It's clear that I've misunderstood the expression "containing Rexx
program", maybe this could be clarified a bit. (Or is there a bug here?)
Thanks,
Staffan
------------------------------------------------------------------------------
AlienVault Unified Security Management (USM) platform delivers complete
security visibility with the essential security capabilities. Easily and
efficiently configure, manage, and operate all of your security controls
from a single console and one unified framework. Download a free trial.
http://p.sf.net/sfu/alienvault_d2d
_______________________________________________
Oorexx-users mailing list
Oorexx-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oorexx-users