[vtkusers] vtkObject.toString() for java

Mathieu Malaterre mathieu.malaterre at kitware.com
Mon Feb 21 10:43:49 EST 2005


Steve,

	Could you please enter a bug for this. Simply go to :

http://vtk.org/Bug

	After you enter a short description for your bug, you can later edit it 
and add your patch. BTW you'll need an account to enter a new bug.

Thanks
Mathieu

Steve M. Robbins wrote:
> Hello java-vtk-users
> 
> On Wed, Feb 16, 2005 at 02:40:22PM -0500, David Marshburn wrote:
> 
> 
>>to be honest, steve, i saw your message and thought, "yep, that's a known 
>>bug."  sorry if the lack of response left you thinking no one was using 
>>vtk44 w/java.
> 
> 
> I'm heartened to hear that we're not alone in using vtk with java.
> 
> I wonder if other java/vtk users have an opinion on implementing the
> toString() method.  The patch below implements the toString() method
> on vtkObjects such that it returns the result of Print().  Does that
> seem reasonable?
> 
> -Steve
> 
> Index: Wrapping/vtkParseJava.c
> ===================================================================
> RCS file: /cvsroot/VTK/VTK/Wrapping/vtkParseJava.c,v
> retrieving revision 1.30
> diff -u -b -B -r1.30 vtkParseJava.c
> --- Wrapping/vtkParseJava.c	14 Nov 2003 20:43:38 -0000	1.30
> +++ Wrapping/vtkParseJava.c	20 Feb 2005 07:05:28 -0000
> @@ -493,6 +493,7 @@
>      fprintf(fp,"  public native String Print();\n");
>      /* Add the PrintRevisions method to vtkObject. */
>      fprintf(fp,"  public native String PrintRevisions();\n");
> +    fprintf(fp,"  public String toString() { return Print(); }\n");
>      }
>  
>    if (!strcmp("vtkObject",data->ClassName))
> 
> _______________________________________________
> This is the private VTK discussion list. 
> Please keep messages on-topic. Check the FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
> 




More information about the vtkusers mailing list