On Mon, 15 Jun 1998 09:45:03 -0700, Mitch Gould wrote:
| Could I get some advice about dealing with the consequences of Options
| Explicit?
| When I try to add Options Explicit to a typical AWT application, NetRexx
| wants me to declare my frame object before I use it in main().
| Sure, that's to be expected. Problem is, since main() is static, I run
| into "can't reference non-static properties in a static method" problems
| when I try to start trying to declare the frame object.
The frame you'd use in main, wouldn't be a property of your netrexx class, i.e. assuming something like this
class foo
method foo
-- do other stuff here
method main(args=String[]) static
Frame f = Frame()
f.add(Button("Text"), BorderLayout.CENTER)
f.setVisible(1)
The frame (f) must be created in main, it can't be a property of the class, as the main method is a static method and is associated with the class foo, not a particular
object of class foo....does this help??
----
List Archive:
http://www.FindMail.com/list/netrexx-course/
To Subscribe: e-mail to
[hidden email]
To Unsubscribe: e-mail to
[hidden email]
--
Start a FREE E-Mail List at
http://www.MakeList.com !