Re: Sisc and AWT ....
Matthias Radestock <[email protected]> Thu, 26 Oct 2006 00:31:49 +0100
| Newsgroups | gmane.comp.java.sisc.user |
|---|---|
| Message-ID | <[email protected]> |
Roberto, Roberto Brunelli <[email protected]> writes: > Scott, > > thanks for the pointer. > > I'm trying to go through the (admittedly short) tutorial > > (import s2j) > (import generic-procedures) > > (define-generic show-input-dialog) > (define <option-pane> (java-class '|javax.swing.JOptionPane|)) > (define x (show-input-dialog <option-pane> (->jstring "Enter an integer:"))) > > but then I get > > Error: no applicable method for args (#<java java.lang.Class javax.swing.JOptionPane> > #<java java.lang.String Enter an integer:>) in generic procedure #0=#<procedure > show-input-dialog> > > any help (including sections of sisc/java manuals that should help me)? try (import s2j) (import generic-procedures) (define-generic-java-method show-input-dialog) (define <option-pane> (java-class '|javax.swing.JOptionPane|)) (define x (show-input-dialog (java-null <option-pane>) (->jstring "Enter an integer:"))) Note the call to java-null. See http://sisc.sourceforge.net/manual/html/ch08.html#JavaUsage and http://sisc.sourceforge.net/manual/html/ch08.html#JavaMethods ("Static Java methods can be invoked by passing an instance of the appropriate class or an appropriately typed null object as the first argument to the procedures"). Matthias. ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642