[Kde-java] Help

Felix Rodriguez frodriguez at wesleyan.edu
Tue Aug 26 15:42:30 CEST 2003


Paul,

   I ran into a similiar problem. I am using Gentoo Linux and the entire 
system is compiled using GCC 3.2. I found that using the SUN Jdk won't work 
well because the Sun JDK is compiled with GCC 2.95. I had to switch to the 
Blackdown JDK compiled under GCC 3.2. You can find it at www.blackdown.org. 
I hope this helps.



At 07:01 PM 8/26/2003 +0100, you wrote:
>I'm a Java programmer looking to learn KDE programming, eventually in c++,
>so I'm giving the bindings a try.
>
>I'm following the KDE tutorial at:
>
>http://devel-home.kde.org/~larrosa/tutorial/index.html
>
>and converting the code to java as I go.
>
>I've got a problem at part 3 of the tutorial where they connect the
>File->Open and File->Save menu items to fileOpen() and fileSave() methods.
>The code compiles and runs really well, except that when I select either of
>the above menu items the application crashes.
>
>Here is the c++ code for fileOpen()
>
>
>
>void MainWindow::fileOpen()
>{
>     KURL filename = KFileDialog::getOpenURL( QString::null, "*", this );
>     QString msg = QString( i18n("Now this app should open the url %1 .")
>).arg(filename.url());
>     KMessageBox::information( 0, msg, i18n( "Information" ),
>                 "fileOpenInformationDialog" );
>}
>
>and here is my java version
>
>
>public void fileOpen() {
>         KURL filename = KFileDialog.getOpenURL(null, "*", this, null);
>         String msg = i18n("Now this app should open the url %1 . ") +
>filename.url();
>         KMessageBox.information(null, i18n("Information"),
>"fileOpenInformationDialog");
>}
>
>I've identified that the KFileDialog line is the offending one and that
>getOpenURL() takes one more parameter (a string) then the c++ version. Can
>anyone see what's wrong?
>
>Thanks, Paul.
>
>_______________________________________________
>Kde-java mailing list
>Kde-java at mail.kde.org
>http://mail.kde.org/mailman/listinfo/kde-java


Felix Rodriguez
Programmer Analyst
Phone: 860-685-3984
Email: frodriguez at mail.wesleyan.edu




More information about the Kde-java mailing list