[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [platform-swt-dev] From Swing to SWT
|
Thursday, January 16, 2003, 3:22:07 PM, Lane Sharman wrote:
> setData(Object) sets the data value for
> the widget, eg, new Boolean(true), for a check box widget.
Actually, it does not. setData() is just a slot for you to store
anything you wish. It has no relation to the widget or its value. It
would be a great place to store things that weren't already supported
by the API. From the Javadoc:
* Sets the application defined widget data associated
* with the receiver to be the argument. The <em>widget
* data</em> is a single, unnamed field that is stored
* with every widget.
* <p>
* Applications may put arbitrary objects in this field. If
* the object stored in the widget data needs to be notified
* when the widget is disposed of, it is the application's
* responsibility to hook the Dispose event on the widget and
* do so.
David
--
Regards,
David
mailto:dlwhiteman@xxxxxxxxxxxxxxx