I have tried the new code. There are not errors in the prompt, but the boxWidget still doesn't work. It seems like boxWidget and the cone are not well connected.
The final code that I have after using "run": (ns example (:import (javax.swing JFrame JPanel SwingUtilities))) (clojure.lang.RT/loadLibrary "vtkCommonJava") (clojure.lang.RT/loadLibrary "vtkWidgetsJava") (def boxWidget (vtk.vtkBoxWidget.)) (def myCallback (fn [] (let [t (vtk.vtkTransform.)] (.GetTransform t) (-> boxWidget .GetProp3D (.SetUserTransform t))))) (defn main [] (let [cone (vtk.vtkConeSource.) coneMapper (vtk.vtkPolyDataMapper.) coneActor (vtk.vtkActor.) ren (vtk.vtkRenderer.) renWin (vtk.vtkRenderWindow.) iren (vtk.vtkRenderWindowInteractor.) style (vtk.vtkInteractorStyleTrackballCamera.) t (vtk.vtkTransform.)] (doto cone (.SetHeight 3.0) (.SetRadius 1.0) (.SetResolution 10)) (doto coneMapper (.SetInputConnection (.GetOutputPort cone))) (doto coneActor (.SetMapper coneMapper)) (doto ren (.GradientBackgroundOn) (.SetBackground 0.5 0.6 0.8) (.AddActor coneActor) (.ResetCamera)) (doto renWin (.AddRenderer ren) (.SetSize 300 300)) (doto iren (.SetRenderWindow renWin) (.SetInteractorStyle style)) (doto boxWidget (.SetInteractor iren) (.SetPlaceFactor 1.25) (.SetProp3D coneActor) (.PlaceWidget) (.AddObserver "interactionEvent" myCallback "run") (.On)) (doto iren (.Initialize) (.Start)))) (example/main) -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en