Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [platform-swt-dev] Re: Subclassing Shell


Also known as a helper.  <g>


"Jeff Brown" <j9brown@xxxxxxxxxxxxxxxxx>
Sent by: platform-swt-dev-admin@xxxxxxxxxxx

01/09/2004 12:59 AM
Please respond to platform-swt-dev

       
        To:        <platform-swt-dev@xxxxxxxxxxx>
        cc:        
        Subject:        RE: [platform-swt-dev] Re: Subclassing Shell



Try a factory method perhaps.

> -----Original Message-----
> From: platform-swt-dev-admin@xxxxxxxxxxx
> [mailto:platform-swt-dev-admin@xxxxxxxxxxx] On Behalf Of
> Markus Enzenberger
> Sent: January 8, 2004 1:02 PM
> To: platform-swt-dev@xxxxxxxxxxx
> Subject: [platform-swt-dev] Re: Subclassing Shell
>
>
> On Thu, 8 Jan 2004, Steve Northover wrote:
>
> > To really answer this question, you need to describe the cases that
> make
> > sense to you.
>
> for instance, I want to ensure that all my windows get the same
> application icon, so I make a base class, that derives from
> Shell and sets the image in the constructor.
> >From a OO design point of view, there is nothing wrong with that.
> The subclass clearly has a is-a relationship with Shell and since I
> don't want to make any more assumptions about the derived classes, a
> wrapper class would be not good, essentially instead of
> inheriting the
> whole Shell API, I would have to wrap a huge amount of functions.
>
> > The technical reaons are that the Shell class was not
> > designed to be subclassed and is different on different platforms.
>
> the implementation of Shell is different on different
> platforms, but not
> the API. And the implementation (whether it uses Java or JNI) is
> encapsulated in a class.
> with technical reasons I mean any other reasons than whether
> it is good
> or bad software design. Is it a bug if I create a sublass of
> Shell? How could something break or be platform-dependent?
>
> Thanks
>
> - Markus
>
> _______________________________________________
> platform-swt-dev mailing list
> platform-swt-dev@xxxxxxxxxxx
> http://dev.eclipse.org/mailman/listinfo/platfo> rm-swt-dev
>

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


Back to the top