keinfarbton at googlemail.com
Sun Aug 3 18:30:13 PDT 2008
> I'm trying to manipulate the text on a button in my shell, but no matter
> what I try, I continue to get:
> object.Exception: Access Violation
> The code I'm attempting to run is attached. Can anyone take a look and shed
> some light on what I'm doing wrong? Thanks!
The documentation of SWT says for most widgets:
IMPORTANT: This class is not intended to be subclassed.
So do not subclass Shell, instead use it as a member variable.
But the access violation is caused by accessing a local variable from
your startStopButton selection listener. The initComponents method is
finished long before the listener is called. So the "startStopButton"
variable do no more exist. Make this variable a member var of the
More information about the Digitalmars-d-dwt