Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [platform-swt-dev] Why is Widget.data an Object?


It's an optimization.  Every field we add to widget takes up space in every widget that an application creates.  Applications create a ton of widgets if you consider that every menu and tool item is a widget.  The KEYED_DATA flag tracks whether the data field in Widget contains a single object (that the user set with Widget.setData(Object) or key/value pairs (set with Widget.setData(String, Object).



Scott Kovatch <skovatch@xxxxxxx>
Sent by: platform-swt-dev-bounces@xxxxxxxxxxx

03/27/2008 02:17 PM

Please respond to
"Eclipse Platform SWT component developers list."        <platform-swt-dev@xxxxxxxxxxx>

To
"Eclipse Platform SWT component developers list." <platform-swt-dev@xxxxxxxxxxx>
cc
Subject
[platform-swt-dev] Why is Widget.data an Object?





Hello,

Why does Widget use an Object to store data and track it with KEYED_DATA? Is there some kind of backwards compatibility going on here?

Scott

------------------
Scott Kovatch

Cupertino, CA

skovatch@xxxxxxx


_______________________________________________
platform-swt-dev mailing list
platform-swt-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/platform-swt-dev


Back to the top