Initializing a dialog? [message #447279] |
Mon, 13 December 2004 07:00 |
Eclipse User |
|
|
|
Originally posted by: manish.garg.gmail.com
Hi,
I have case where I want to open a dialog and set some data in the text
fields.
My calls looks like the following.:
1. MyDialog dlg= new MyDialog (...);
2. dlg.initializeValues();
3, dlg.open();
I initialize the value through the method initializeValues on line 2.
However, the textbox which gets calls setEnabledOK() in the modifyListener
and at this point I get a nullPointerException. The setEnabledOK cannot be
called before dlg.open(). But setting the values in the textBox will cause
this to happen.
It looks like a common case and there must be a solutions to this so I hope
someone will reply.
thanks
Manish
p.s.: I cannot swap lines 2 and 3 because the dlg.initializeValues() will
not be called.
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.02180 seconds