[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [platform-swt-dev] Re: Subclassing Shell
- From: Bob Foster <bob@xxxxxxxxxx>
- Date: Thu, 08 Jan 2004 15:38:10 -0600
- Delivered-to: email@example.com
- User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.5) Gecko/20031007
David Whiteman wrote:
You are definitely well versed in the pros and cons of subclassing vs.
And these pros and cons do not belong on this list. Whether SWT should
be more "object-oriented" is a permathread and should be directed to the
You are *probably* safe if you override an API method to do something
simple, and then call the superclass version of the method. But it
was still not designed to guarantee safe subclassing. The whole thing
is being aware of the risks involved, even if they are small.
With respect, the whole thing is that "not designed to be subclassed"
means that subclassing is not supported. The names or arguments of
protected methods may change in any future release or may the methods
may go away entirely. They may be different on different platforms. Even
if they stay the same, the semantics of the methods and/or the order in
which they are invoked may change. There is no way to assess the risk of
Classes like this should be subclassed only to fix urgent bugs there is
no other way to fix.