Stateful traits (was Re: [ANN] Open meeting regarding the Squeak
Release Team)
Martin Beck
martin.beck at hpi.uni-potsdam.de
Mon Feb 11 13:19:47 UTC 2008
Hi,
Igor Stasenko wrote:
> On 11/02/2008, stephane ducasse <stephane.ducasse at free.fr> wrote:
>
>> Exact. The problem is that the more I think about it the more I thikn
>> MI is difficult :)
>
> And useless, in 99% of real world cases ;)
>
In a current project unfortunately forced to be in Java, we use Qt Jambi as
user interface library. To use the Qt 2D-Drawing facilities, you have to
inherit
from them. But of course, our database model shall not include these
data and has its own inheritance graph, thus due to single inheritance
in Java, we ended up with duplicated hierachy trees: One for the
database model, one for the Qt-2D-Items.
public class Event {...}
public class RoadEvent extends Event {...}
public class EventItem extends QGraphicsItem { Event mappedEvent; ...}
public class RoadEventItem extends EventItem {...}
This is simply not beautiful. There exist Qt Jambi interfaces to
circumvent this, but then the code of QGraphicsItem needs to
reimplemented, because interfaces don't have implementation on their own.
Btw, did anyone think of something like QTSqueak yet? What happend to
wxsqueak?
Regards,
Martin
More information about the Squeak-dev
mailing list
|