|
From: <pi...@hu...> - 2001-04-30 16:08:18
|
Any thougts on the best way to bind events?
I'm working with a form that has two text fields and a button; eventually
it's going to be a login form. For the button I'm using:
btnLogin = java.awt.Button("Login", actionPerformed=processLogin(txtLoginID.text,
txtPasswd.txt))
When I have any type of parameters for processLogin it dies on me with (I
didn't paste the entire traceback):
java.lang.ArrayIndexOutOfBoundsException
If I place 'actionPerformed=processLogin("test")' it prints out "test" when
the program starts and does nothing when the button is pressed. When I
place 'processLogin' by itself the method is invoded, however it has no
way of knowing about the values in the login method (where the form is created).
I have some buttons and menu items on other forms that don't need to pass
parameters and they work fine. Does anyone know of a better way to pass
this information?
Thanks for any help,
Wayne
Free, encrypted, secure Web-based email at www.hushmail.com |