This is the mail archive of the kawa@sourceware.org mailing list for the Kawa project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Kawa Compilation


Per,

Thanks for the e-mail; your lack of knowledge about IE and Applets is probably matched by mine about Unix, GNU and CVS, but perhaps we can put together something that spans the divide for anyone else who needs it, so let me start with some basics. (I should point out that, in the same way that Richard Stallman shows little interest in mastering Windows, becoming an expert on Unix is not on my agenda; but I can usually follow a set of instructions if they are complete and specific enough, and I have a system that runs Xandros Linux which I use in the same way as I do Windows. I realize that my questions are probably elementary and have obvious answers if you are familiar with the Unix world, but I can assure you that the answers are not obvious if you don't know - or wish to know - about that world.)

What is the significance of the fact that the current CVS archives has fixed the problem I described in my last e-mail, and what might I do about that? Is there a new Kawa binary I could download, and where? Or would I have to build a new Kawa for myself? If I have to build it, I could do that - rather slowly - under Linux, given precise enough instructions (Xandros provides command prompt access through bash). Once built, Kawa appears to port directly from Linux to Windows. When I read the instructions on "Installing and using the source distribution" in the Kawa documentation all sorts of questions come to mind. "In your build directory": I don't currently have a build directory (for anything); what is a good choice for this - some subdirectory under my home directory? - or must it be a system-level directory? (I am the only user of my systems.) What is $PREFIX and how does it get set? Do I need the --enable-kawa-frontend flag if I want to mark, copy and paste in the Kawa window (I do)? Do I need --with-swing if I intend to use Swing even without JEmacs (again, I do)? If all the needed details are already explicitly documented, perhaps you could point me to the appropriate location, otherwise, if it is necessary to do a build, a good approach might be if you were to publish or send me exactly the setup and commands used to build the distributed binary version of Kawa, since this provides functionality adequate for what I am currently doing.

On a different but related subject, I decided I could explore some interface questions directly in Kawa, without needing to use an Applet, and I entered and ran the code below (adapted from The Definitive Guide to Java Swing by John Zukowski - ISBN 1-59059-447-9 - pp. 19-22). The code just creates a new window with a button that causes printing in the Kawa window when pressed, but it does it on a new thread. The code runs fine (once you discover that the method signature includes the return value type, which is not true in Common Lisp), but when I close the window it creates on its new thread, Kawa closes too. If you run the code on the Kawa thread that also happens, which is fair enough, but I think I would have expected the Kawa window to remain open in the separate thread case.

Thanks for all your help - Nigel Dolby.

-----------------------------------------------------------------------------------------------------------------------------------

(define-simple-class <AnActionListener> (<java.awt.event.ActionListener>)
 ((actionPerformed (actionEvent :: <java.awt.event.ActionEvent>)) <void>
  (format #t "~%I was selected~!")))

(define-simple-class <ARunnable> (<java.lang.Runnable>)
((run) <void>
(let ((frame (make <javax.swing.JFrame> "Button Sample"))
(button (make <javax.swing.JButton> "Select Me"))
(actionListener (make <AnActionListener>)))
(invoke frame 'setDefaultCloseOperation
(static-field <javax.swing.JFrame> 'EXIT_ON_CLOSE))
(invoke button 'addActionListener actionListener)
(invoke frame 'add button (static-field <java.awt.BorderLayout> 'SOUTH))
(invoke frame 'setSize 300 100)
(invoke frame 'setVisible #t)
)))


(define ButtonSample
 (lambda ()
   (let ((runner (make <ARunnable>)))
     (invoke-static <java.awt.EventQueue> 'invokeLater runner))))

[Evaluate (ButtonSample) in the Kawa window.]


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]