Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: RE: [platform-swt-dev] org.eclipse.swt.SWT

On the other hand, the whole constants/flag thing is pretty weak.  For one
thing, it's not clear by looking at a component class what properties it
supports.  You have to look at the JavaDocs to find out.  It's just plain
unwieldy trying to track down which SWT constants apply to which components.
As components get extended and the API grows, this is just going to get
worse. 

It would make sense to wrap all of these constants with set/get methods, ala
JavaBeans.  I realize JavaBeans isn't supported in SWT but having properties
declared via methods would make the users' lives much easier.  Under the
covers, the SWT programmers can still use the SWT constants to avoid
breaking existing code.  


>>>>> Why does SWT class contain constants representing different concepts?
>>>>> SWT has constants for event, color, and even error messages! All
different
>>>>> concepts merged into one monolothic class. What was the design
rationale
>>>>> behind this?

>>I have made exactly the same reflection as yourself. But then I made a
>>second reflection. If you change that now, you break not only SWT itself
>>(the sources refer in million places to these constants) but equally well
>>all code built on top of SWT. We will have to live with this forever, I
>>guess.


------------------------------------------------------------------------------
This message is intended only for the personal and confidential use of the designated recipient(s) named above.  If you are not the intended recipient of this message you are hereby notified that any review, dissemination, distribution or copying of this message is strictly prohibited.  This communication is for information purposes only and should not be regarded as an offer to sell or as a solicitation of an offer to buy any financial product, an official confirmation of any transaction, or as an official statement of Lehman Brothers.  Email transmission cannot be guaranteed to be secure or error-free.  Therefore, we do not represent that this information is complete or accurate and it should not be relied upon as such.  All information is subject to change without notice.




Back to the top