Problem with sample from Redbook

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Problem with sample from Redbook

Stefan Gombar
Hi

I just stumbled over this problem. I am just starting using NetRexx and Java, so
I am also curious what problem this is.

When I try to compile the 'Animator' applet from the GUI samples, these
error messages occur:

-------------

[E:\PROGRAMM\NrxRedBk\gui\Animator]call nrc -nocrossref Animator
NetRexx portable processor, version 1.125
Copyright (c) IBM Corporation, 1998.  All rights reserved.
Program Animator.nrx
  === class Animator ===
    method init
      overrides Applet.init
    method drawText(Color)
    method calculatePosition(int)
    method calculateSize(int)
    method update(Graphics)
      overrides Container.update(Graphics)
    method paint(Graphics)
      overrides Container.paint(Graphics)
    method run
      implements Runnable.run
E:\PROGRAMM\NrxRedBk\gui\Animator\Animator.java:8: Can't make forward reference to netrexx
in class Animator.
protected java.lang.String
netrexx=netrexx.lang.Rexx.toString(netrexx.lang.Rexx.toRexx("Netrexx"));
                                   ^
E:\PROGRAMM\NrxRedBk\gui\Animator\Animator.java:8: No variable lang defined in class
java.lang.String.
protected java.lang.String
netrexx=netrexx.lang.Rexx.toString(netrexx.lang.Rexx.toRexx("Netrexx"));
                                          ^
2 errors
Compilation of 'Animator.nrx' failed [javac failed]

---------------

The code from 'Animator.nrx':

<snipped>
class Animator extends Applet implements Runnable

  Properties inheritable
    netrexx     = String "Netrexx"             -- image string
    stringImage = Image                        -- image of the drawn string
    gi          = Graphics                     -- graphics object of image
<snipped>

Here what is in 'Animator.java.keep':

<snipped>
public class Animator extends java.applet.Applet implements java.lang.Runnable{

/* properties inheritable */
protected java.lang.String
netrexx=netrexx.lang.Rexx.toString(netrexx.lang.Rexx.toRexx("Netrexx"));
protected java.awt.Image stringImage;
protected java.awt.Graphics gi;
<snipped>

If I declare the variable in the 'Init' section, the applet can be compiled.

  --------------------------- applet INIT
  method init()
    netrexx = "NetRexx"
    x = 200; height = 0; width = 0             -- re-init


Thanks for your help.

Best regards,

Stefan

P.S. BTW, for the adventurous people there is a new Netscape Beta at testcase.
It seems that it handles the 1.1-stuff better. Unfortunately the 'crashing syndrome'
is still built in.


                                       \\||//
                                       ( .. )
------------------------------------oOO--()--OOo-------------
Stefan GOMBAR
Official OS/2 Support for the
University of Technology, Vienna
Austria, Europe

email: [hidden email]
        [hidden email]
Member of TeamOS/2, SDP
Certified OS/2 Engineer

Please visit my homepage:
  http://stud1.tuwien.ac.at/~e9125065/

Please visit the OS/2 Information Center:
  http://www.os2forum.or.at/TeamOS2/

###  OS/2 Warp 10th Anniversary (1987 - 1997)              ###
###  Personal computing to network computing...and beyond  ###


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
To unsubscribe from this mailing list ( ibm-netrexx ), please send a note to
[hidden email]
with the following message in the body of the note
unsubscribe ibm-netrexx <e-mail address>