Inheritance of Variables (properties)

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

Inheritance of Variables (properties)

Kai Warendorf
Hi, I am knew to netrexx and have a problem with variable inheritance.

I have

class foo public

        properties public
        text = String

        ...

class subfoo public extends foo

        method saytext
                say "text from foo: " text

        ...

This gives an error, unless i put super.text in subfoo.
Is that a property of netrexx, that I cannot use variables
directly.

Please help
--
Dr.-Ing. Kai Warendorf
Nanyang Technological University
School of Applied Science
Blk N4 #2a-36
Nanyang Avenue
Singapore 639798
Tel: (+65) 7996266 Fax: (+65) 7926559
mailto://[hidden email]

vcard.vcf (499 bytes) Download Attachment