[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    QT-java bindings experiments
From:       Andreas Schlapbach <schlpbch () iam ! unibe ! ch>
Date:       2002-06-28 21:25:57
[Download RAW message or body]

Hi all

At university I'm doing a master on scripting components using JAVA.
More precisely, I've implemented a framework that allows subclassing and
interface generation at runtime by creating bytecode on the fly and
loading that into the JVM.

The framework works, I've been able to create arbitrary classes and 
implement for instance event listeners.

Currently I'm looking at scripting various GUI Frameworks, and QT is of
course one of them. But I run into the following problem: Whenever I
create a subclass of QFrame,

      createQTClass():
          'aQTClass = instantiate
              name = "MyWidget"
              superClassName = "org.kde.qt.QFrame"
              interfaceNames = [ ]
              accessModifier = AccessModifier.public
              methods = [  ]

          aQTClass


I get crashes of the whole VM:

[java] QPaintDevice: Must construct a QApplication before a QPaintDevice
[java] Java Result: 1

which is coming from 'src/kernel/qpaintdevice_x11.cpp':

QPaintDevice::QPaintDevice( uint devflags )
{
      if ( !qApp ) {              // global constructor
#if defined(QT_CHECK_STATE)
      qFatal( "QPaintDevice: Must construct a QApplication before a "
          "QPaintDevice" );
#endif
      return;
      }
      devFlags = devflags;
      painters = 0;
      hd = 0;
      rendhd = 0;
      x11Data = 0;
}


I know, I'm doing some crazy stuff and pushing the QT-JAVA wrappers to
the limit. But may be you have a hint what I might be doing wrong.
Especially, what I would like to know, what exactly is going on in the
C/C++ part of the wrappers. I don't see why the QApplication doesn't get
constructed, because proqramming QT in C++ or JAVA does that behind my
back for me.

Thanks for any hints,
Andreas



-- 
Andreas Schlapbach      schlpbch@iam.unibe.ch
http://www.iam.unibe.ch/~schlpbch

 
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic