Most compilers I've used do/provide this with a crossref/xref
option. Is this not available in NetRexx?
Yes, NetRexx provides a crossref option (unlike most 'modern'
compilers). But I suspect that would not have helped in this case
because the re-use of the 'source' variable was valid because the second type
used was a subclass of the first use. [I have not looked at the classes
in question.]
In short .. the compiler is doing exactly as it is supposed to, and
if the method used belonged to the higher class then it would have
worked. As it did not, it reported that the method could not be found in
JTextField, which is correct and also indicates the type of the variable
'source' correctly (as would also be shown in the crossref), I
think.
One could definitely argue that dynamic typing would be more
Rexx-like in this case, but there's also a strong argument that following Java
rules is appropriate here, too. A 'pitfall' of inheritance,
really.
Mike
_______________________________________________
Ibm-netrexx mailing list
[hidden email]
Online Archive :
http://ibm-netrexx.215625.n3.nabble.com/