Thread problem

sleek cslush at
Sun Aug 3 18:37:56 PDT 2008

The startStopButton is a member variable. I am just initializing it in the 
initComponents method. Thanks for the info about not sub-classing Shell. I'm 
used to writing Swing code where normally you extend most widgets.

"Frank Benoit" <keinfarbton at> wrote in message 
news:g75m35$1jot$1 at
> sleek schrieb:
>> 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 MainWindow class.

More information about the Digitalmars-d-dwt mailing list