Exposed method parameters in Object-Rexx vs. PUBLIC class Properties in NetRexx

Exposed method parameters in Object-Rexx vs. PUBLIC class Properties in NetRexx

Post by Gilbert Ba » Wed, 16 Jul 2003 23:45:38


Tom,

My experience is that the exposed variables are only visible within the
distinct methods of the class. Some of the OODIALOG classes use exposed
variables heavily and I found, in attempting to subclass them, that I
couldn't "see" the exposed variables in the overriding methods. Hope
this helps with your effort.

Gil Barmwater
 
 
 

Exposed method parameters in Object-Rexx vs. PUBLIC class Properties in NetRexx

Post by Thomas.Sch » Wed, 23 Jul 2003 17:02:05

Thanks for the answers collected so far ...


Rony, I do NOT understand your comment on this topic.I would like to
get rid of the need for the setter and getter methods for Object-Rexx
ATTRIBUTE methods, and directly use references to the proper Java
Properties ...

Currently, I do believe Object Rexx ATTRIBUTES are semantically
equivalent to NetRexx/Java Properties. Why shouldn't we use this as a
'feature' in the translation process??

Tom.

 
 
 

Exposed method parameters in Object-Rexx vs. PUBLIC class Properties in NetRexx

Post by rony » Tue, 29 Jul 2003 01:21:14


The reason is that the METHOD-directive with the keyword "ATTRIBUTE" creates a get-
and a set-method, thereby allowing *indirect* access to the attribute, but doese *NEVER*
expose it to anyone outside the methods. An Object Rexx attribute therefore can only
be accessed directly in the object scope (i.e. within methods which explicitly define
direct access to it with the EXPOSE statement; cf. the mentioned article discussing the
various scopes present in Object Rexx).

---rony