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

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
E:\PROGRAMM\NrxRedBk\gui\Animator\ Can't make forward reference to netrexx
in class Animator.
protected java.lang.String
E:\PROGRAMM\NrxRedBk\gui\Animator\ No variable lang defined in class
protected java.lang.String
2 errors
Compilation of 'Animator.nrx' failed [javac failed]


The code from 'Animator.nrx':

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

Here what is in '':

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

/* properties inheritable */
protected java.lang.String
protected java.awt.Image stringImage;
protected java.awt.Graphics gi;

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,


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.

                                       ( .. )
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:

Please visit the OS/2 Information Center:

###  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>