On Tue, Jun 26, 2012 at 3:34 PM, Antonio Recio <amdx6...@gmail.com> wrote: > I would like convert this python line to clojure: > vtkCompositeDataSet.NAME() > > When I read vtkCompositeDataSet.java I find this: > private native long NAME_16(); > public vtkInformationStringKey NAME() { > long temp = NAME_16(); > > if (temp == 0) return null; > return > (vtkInformationStringKey)vtkObject.JAVA_OBJECT_MANAGER.getJavaObject(temp); > } > > I have tried in clojure this, but it doesn't work : > user=> (println (vtk.vtkCompositeDataSet$Attr/NAME)) > #<CompilerException java.lang.ClassNotFoundException: > vtk.vtkCompositeDataSet$Attr, compiling:(REPL:13)> > > How I can write it in clojure?
vtkCompositeDataSet does not appear to have an Attr enum/class/whatever inside it in the C++ API. As vtkCompositeDataSet.NAME is not a static function in the Java API (discovered by yet again looking at the generated Java source code) you'll need an object instance, in contrast to C++ where it is declared static.. The following works for me (as in, it returns a Java object of type vtkInformationStringKey), but I have no idea how meaningful it is.. (.NAME (vtkCompositeDataSet.)) or (.NAME (new vtkCompositeDataSet)) I'm guessing you'll want to get in touch with VTK people at this point to get better answers to how to use the Java API in general (I've just dug into the generated Java code for every answer I've given so far). Lars Nilsson -- 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